Have your piano tuned every year. Due to the tremendous amount of tension on the strings and the complex mechanisms that drive the hammers, pianos are constantly needing service. Once a year is sometimes enough, however pianos that are tuned every six months stay in tune and thus retain their value longer.
Play your piano. The mechanical parts inside your piano need to be regularly manipulated in order to keep everything moving smoothly.
Long term stuff. After about 10 years the parts that move the keys and hammers will be wearing down and need to be either adjusted or replaced. Your technician will handle little things as they break down during your regular tuning visits, but after a long time so many things will need attention you will need more significant repairs or even a process called regulation.
Tune your piano after you move it. The simple act of lifting, setting down and rolling disrupts the careful placement of its 236 tuning pins, and humidity and temperature variations in its new environment will cause it to go out of tune. Schedule your tuning for three or more days after you move to allow it to acclimate to its new home.
In fact, just moving the piano to different areas within your home can cause it to slightly lose its tuning, especially if it is to or away from a window that gets direct sun, a sliding glass door to the outside, an air-conditioning vent or any other area that experiences hot and cold shifts throughout the day.
If you are a recording musician, it is absolutely essential to have the instrument tuned directly before a recording.