This is an excellent question. If you have an acoustic piano it will need ongoing, regular tuning and maintenance to keep it working in tip-top shape.
Ideally a piano should be tuned annually (at least once per year). If you have recently purchased a new piano, it is best to tune it two times in the first year. And then afterward, annually. However, if your piano gets a great deal of use (such as a student who practices 4 or more hours a day, or a teacher who practices and also teaches hours/day on the same piano, etc) then it may be best to have the piano tuned more frequently — at least every 6 months or so.
A beautifully tuned piano in good working order is a joy to play!