If you plan to buy a digital piano, I would recommend you buy new. As I said previously, digital pianos need no maintenance but it is also irreparable when they break down. Instead of saving a few hundred dollars buying a used digital pianos that may break down at anytime, you should just buy a new one with manufacturer warranty.
Acoustic pianos are a different story. Because acoustic pianos are made of wood, steel, and wool, a qualified piano technician can repair any acoustic pianos regardless of the brand. There are also piano rebuilders who take old pianos and make them like new again though quite expensive. Generally speaking, you will find better deals in used pianos than new pianos. New pianos, like new cars, tend to lose their values more sharply in the first few years.
The challenge of buying a used piano is to evaluate the piano and know what to avoid. I will address the tips for buying a used piano in the next question.