There's something magical that happens to us when we go car shopping.

We tend to put on our rose-colored glasses and try to pretend that bad things don't exist on these metal and plastic beauties. As we look over a sea of new cars, all we see is perfection: Beautiful, shiny, awesome-smelling perfection.

The thing is, we know better. We know that when you look at a potential new purchase, you should be looking for the bad stuff, but all we see is the shiny paint job and the freshly Armor All-ed wheels. No one expects the transmission to be bad work or the air bags to be filled with confetti.

When you get to a dealer's lot -- or even during a private sale -- there are some things you should do to ensure that you aren't getting stuck with a lemon.

car repair man working under the hood

No. 5: Check the car's past

The Internet is good for more than watching delightful cat videos and debating whether Kirk or Picard was the better Star Trek captain (it's Kirk, by the way). There are also services that allow you to enter the car's VIN number and get a detailed history of what the car has been through.

Has it ever been in an accident? Carfax.com can tell you. Did it have warranty work done? Check the Carfax report.

In addition to the report, ask to see maintenance records. Checking a Carfax report plus maintenance and service records gives you a good idea of any problems the car has had and how well it has been kept up on.

And at most car dealers, the Carfax report is free, but if you are considering a car from a private party or a dealer that doesn't offer this service, an online report costs about $35.

mechanic checking out car with customer

No. 4: Get a mechanic to look it over

I watch a lot of TV judge shows -- and not just because I love to see women get screwed over when they lend money to guys they've only known for a week. In all the hours I've watched, one thing has become resoundingly clear: If you buy a used car, hire a mechanic to check it out.

Spending $100 now can save you thousands in the long run. If the mechanic is able to spot a chronic problem, you will have dodged a bullet.

The problem most people have with this concept (and what keeps "People's Court" on the air) is that they worry that they'll have to expend more money in addition to the price of the car.

But it can be a negotiating point. Ask the car seller to pay for the mechanic, or take that fee off the sale price of the car. If they balk, you might want to reconsider the purchase.

car salesman looking under hood with customer

No. 3: Ask questions

Don't be shy about asking into the car's history. Were repairs done? Any repeatedly? The thing with a used car sale (especially private sales) is that most of them are "as is" sales. That means that if you drive the car away and it breaks down 15 feet from the seller's door, you're still responsible for the car.

But that's not the case if the seller makes false claims about the car. That is, if you ask straight out if the engine is OK and he says, "There's never been any problems" but then later you discover that it's been spraying out oil, then that is a fraudulent statement.