Pianos are complex mechanical and acoustical instruments. Several adjustments on each key action must be correctly set to very close tolerances. The interaction of many pieces of wood, leather, and felt must be precise to effect a series of smooth and flawless motions.
Incorrect or fluctuating humidity is the main cause of problems in a piano. Excessive humidity will cause swelling of the wooden parts and sluggish or sticking keys. This usually occurs during the summer season. A room dehumidifier can help by removing excessive moisture in the air.
Insufficient humidity over a period of years will cause wooden parts to dry out, shrink, and become loose or wobbly. Glued parts separate, felts fall off, and cracks may appear in the sound board. This usually occurs during the winter season. A room humidifier can help by increasing the relative humidity of the air.
The piano strings must be kept at the proper tension so all of the sound board area is under equal pressure (several tons!). As years pass, the strings stretch and the pitch goes flat. The pressure on the sound board lessens and becomes uneven, potentially distorting the sound board. Moving a piano, even a short distance across a room, can detune the strings.
Piano tunings should be performed at least annually (semi-annually is ideal) to compensate for stretching of the strings. Humidifiers and dehumidifiers, if installed in the piano, should be activated a few weeks before a tuning is to be performed. Some technicians are opposed to the use of these devices, claiming they do more harm than good. You should try all other remedies before resorting to them, and understand the potential consequences of their operation on your piano. The piano should be at normal room temperature during the tuning. The temperature of the room should not vary during the tuning.