Look at ads very carefully and if there are photos or video does what you see tie up with what they say? Is video edited so you see the horse in each pace but don't see the transitions? You're looking for what they don't say or show as much as what they do. Make a list of questions that are important to you and if they aren't covered in the advert ask them before you visit - if they're evasive then that says enough.
When you visit make sure you see him handled and tacked up and watch how they are around the horse - relaxed and trusting or are they always keeping a close eye on him as though they expect something to happen? See him ridden in all paces on both reins before you decide if you want to ride - there's no shame in saying no thanks at this point if you know he's not for you. As well as watching the horse watch the rider, are they confident and relaxed? How quickly and to how small an aid does the horse respond? How good is the rider - a horse may give you a lovely ride when regularly ridden by a good rider, but may turn into a very different ride when regularly ridden by someone less skilled. If you go ahead and ride remember the idea is to get a feel rather than show off, it doesn't hurt to see what happens if you get a bit unbalanced or make a faff of something - that alone will tell you a lot about the horse. If you feel you're riding at your limit then probably best to walk away unless you'll have a lot of help, changing home and rider usually brings up some bumpy times so better that you feel you have some leeway. On a personal level how do you feel about the horse - if it was to fail a vet would you not be bothered, a bit upset, or gutted? If not bothered then keep looking. And always have a horse vetted by your choice of vet, if the seller tries to talk you out of a vetting, into a lower level vetting, or into using their vet then be very wary indeed or better yet walk away.
If you can get a horse word of mouth that's great as you'll often be able to find out a bit more. Still follow the same procedure though, and still have a vetting - with the best will in the world there can be problems that an owner doesn't know about.
Normally I would say visit more than once and take someone knowledgeable with you for at least one visit. However in the current (UK) market this may not be an option since as well as being expensive at the moment decent horses are selling very fast.