First of all, please be prepared. And start doing as much research as you can. Read reviews, consumer reports, ask colleagues and friends, compare options, gather gas consumption data on the make and model you're interested in. Examine reliability ratings. Try to determine maintenance costs and upkeep, etc. Your goal should be to narrow your search to one or two models. Why? Because if you just enter a dealership without knowing what you want, chances are more likely than not that you won't be happy with your purchase. Later you may find out that it's simply not exactly what you wanted or what you can afford. Someone I know bought a used BMW wagon for quite a reasonable price. When he went for servicing, they discovered that the rear shock absorber was leaking. The price for the part alone was close to $1000! Finally, he sold his BMW and bought a used Camry that proved less expensive to maintain.
Another purpose to narrow your choice down to only one or two models is because when you test-drive a few different cars of the same model, it will be much easier for you to compare their condition and pick the best one. Recognizing a transmission problem during your test drive would be easier to do if you were to try a few vehicles of the same model instead of becoming confused by testing out different models.
Second, without a doubt, you should check a car's history records. This will help you to eliminate half of the vehicles from your list with potential problems. Vehicles that have been flooded or restored after serious accidents, those with rolled back odometers, heavily abused vehicles (e.g., ex-rentals), those with outstanding liens, etc., can be eliminated after simply checking the history record of the vehicle. In fact, it is not even a good idea to look into a car until you check its history.
To learn further How To check a car's history click on this link: How to check a car history by the VIN number.
Third, Don't buy based on what you've been told because it may not always be the truth. Check out the car yourself very carefully. Ask a knowledgeable person who knows about cars to help you.
Check my Illustrated used car checklist to learn what to look for in a used car.
As a final step, bring the car to the mechanic you trust for an inspection. A word of caution, NEVER give a deposit or sign a contract before the car is inspected.
Fourth, Be extremely careful when doing the paperwork. For example, if you buy from a private owner, make sure there are no registered liens against the vehicle and that the person who signs the Bill of Sale is the actual owner of the car. Check with the Vehicle Registration Authorities to make sure the car has not been stolen.
If buying from a dealer, read the warranty policy and all the papers including the fine print very carefully. If it's a "Certified" used car, you'd be wise to check exactly what items were checked off and approved because sometimes the car might have a history of an accident in the past, come with a poorly maintained engine and still be Certifiable. Do not rely on a salesperson's verbal promises. Whatever is promised, get it in details in writing. Find out if the remaining original warranty will be transferred into your name. Different manufacturers have different warranty policies. For questions about vehicle registration, change of ownership, legal aspects, etc., contact your local Vehicle Registration authorities found in my link page.