What do you want to do with your riding? Pleasure, reining, trail riding, hunter jumpers, eventing, dressage, flat classes? Before you buy you need to understand the basics behind this all and what makes for a good horse for your discipline. For example, you're not going to want a leggy 17hh Thoroughbred for reining, or a Paso Fino for dressage. Size is also a consideration. You need a horse that you will not be afraid of because of its size, nor one that's too small to properly carry your weight in a balanced, collected manner.
Ground manners are also essential. You don't want a horse that strikes, flattens his ears, or bites at you when you go to pick up his hoof (been there, done that, needless to say we don't own him anymore). Does he walk quietly on lead and not rush or push you over? Does he respect you and not walk on top of you or take advantage of a loose rein?
Conformation is important as well, ESPECIALLY in the feet. Do NOT get a horse with bad feet unless you're willing to pay the extra farrier bills and wait out the long weeks....or months....that he's unable to be ridden because of sore or bruised feet. Large, sturdy feet are essential for a good, sound horse. The feet should not look too small for his body. Pastern angle is also important. The pastern should be at a 45degree angle from the ground, not more or less. Here's a good article on pastern angles as they contribute to soundness: How to Identify Horse Pastern Problems
Always get a vet check before you buy; it is incredibly crucial. If you can, take a trainer with you before you try him out, make sure he's not drugged, and ride him several times on several occasions before you buy.
Sit down with someone knowledgeable of horses who boards and price out everything for a year. If it's not included in board, figure in farrier, shots, wormers, vaccines, tack, your apparel for showing and schooling, saddle soaps, brushes, hoof picks, grain, hay, shavings, lessons, etc. Most times much of this is included in board, but make sure you know what you're paying for and like the instructors and owners of the barn.
Good luck! Message me if you have any questions :)