If it's used, learn how to look it over for common problems that many people don't think to look for (CV joints, uneven tire wear, rust in the trunk, dents hidden by bras, recently cleaned engine, interior wear or paint condition that doesn't seem to match the miles and can't be explained by the owner).
Don't be afraid to pay to take it to a mechanic. If the seller doesn't want to let you, walk away.
Be willing to go to another state to get the best price.
Look at as many examples of your car as possible. Search eBay.
Don't ever feel you owe the person your money because you spent an hour looking the car over.
If it's new, expect high pressure and shell games. If you can't stand up to a pushy salesman, take a friend with you who can. Have plans to go out with your friend afterward so if they waste too much of your time, you can say you have plans and need to leave soon, and it'll be true.
Learn about their add-ons and whether you want them before you go to the dealership. Know what options you are willing to pay for even if you don't want them, and what options you're not willing to pass on.
Read as many car reviews as you can stomach, even of cars you don't plan to buy. Don't rely on just one source for reviews. In this way you will learn to see through the bias and coloration of different reviewers.