A digital piano will need little more than an occasional wipe with a damp cloth, though do cover the keys in order to keep dust at bay.
An acoustic piano on the other hand, will need tuning once or twice a year and the action (everything that moves between each key and hammer) will need servicing by a good piano technician every five years or so. Changes in temperature and particularly humidity will have a detrimental effect on the instrument and it certainly should not be placed near to a radiator, draughty/open window, or in direct sunlight. The wooden cases of most modern pianos are coated in a protective lacquer which needs no more than a wipe with a damp cloth and then carefully dried. An older instrument may be French polished and will need greater care.