The first poster is right on the money: do your homework. Whether you are lookig for a new or used car you need to know what you are getting and what it is really worth. Spend the time going online and researching the features of cars in your category and price range, as well as the car's history and condition if used. Know what the competitors are offering long before you talk to anyone about a car. Use a mechanic. Use the internet. Do your homework, don't take the word of anyone trying to sell you a car, because the sale is their only goal.
Know what you are looking for and what you can and are willing to pay. Research, research, research and then look for when and where the best deals are. There are definitely certain times of the month and year where you can get a better deal on the same car.
Research, research, research. Know everything you can before you walk into the dealership.
Never agree to a deal before you actually leave the dealership for at least a little while. Dealers will often call you with a better deal once you have left their store. Make them think that they need to improve their terms to get your business.
Walk into the dealership with brochures from other dealers in your hands. Be able to talk about other cars from other manufacturers. Let them know they have competition.
You should, if buying a new car, do a Carfax or other vehicle history check as well, which ensures that the car has not sustained any major damage that has not been disclosed by the seller. If you are financing the car, it is likely your financial institution will do it for you, but if not, you still need to check it. Not only will it tell you what to expect from the car, but it will also let you know what the possibility of resale might be.
After you've decided what you want to buy, wait until the last day of the month to try to buy it. Often times, dealers may be a few cars away from their quota and will be willing to make a better deal, and even lose money, on your car because meeting their quota will make them more money. It doesn't always work, but I got an INCREDIBLE deal one time by taking the car for a test drive and coming back a few minutes before closing.
I would suggest not to buy on impulse. Go on-line and check out a few different cars you are interested in. The go and test drive. Do not make a decision until you have driven all of the cars you planned on driving. Outside of that, do not be pressure by the sales' staff.
My advice is to shop around, and bring a notebook and a camera. Drive as many kinds and types of cars as possible. You will want to take pictures and record notes. Focus first on makes and models, and then worry about features and colors later once you have narrowed down the search to a specific type of car.
I agree with the previous post if you're buying a new car. If you're buying used, the best advice is to make sure that you get a mechanic you trust to look over the car. You can't just trust that the car will be in decent shape. You need to get it checked out.