Know the make and model of the vehicle you want before you go (or pick 2 or 3). (If you don't know what you want and want to go to the lots, then do that BUT NOT to buy- just to figure out what you want). Then, run them through Edmunds and a couple of the other car pricing websites on the internet. They will show the invoice price, what people typically pay in your area, and the MSRP. If you are looking at new cars, they should show what incentives are available in your area, and if not the website for the make of vehicle most likely will have that information. If you are looking at a new car and there are no incentives, don't expect to pay invoice because the dealership must make some sort of profit. I usually shoot for a final price of $1000 over invoice if there are no incentives even if that is lower than what it shows people are paying in that area. (I won't ever go more than $1,500 over invoice even if I love the car, and I have occasionally got it down to $500 or $750 over invoice). If they won't sell it to you for the price you want to pay then walk out. Chances are another dealership will sell it to you for that price and if that is the only dealership of that price in the area- just tell them you are going to go to another city (I used a dealership about 2 hours away) and they will get it for that price. I had them calling me less than an hour after I left the dealership telling me I could have it for the price I wanted to pay. Typically, I don't even have to leave the dealership for the price I want. I have negotiated cars for other family members and friends too. Never let them pull the "What do you want your payment to be" and they will get it set up that way trick--- you want to negotiate the actual price of the car and go from there. If you are financing- check with your bank (or others with lower rates) and see if you can get pre-approved. You are better off financing through your own bank than letting the dealership find your financing usually. Remember- they are trying to find a way to make money off of you any way they can. Some of the financing companies are actually related to the dealers. Some of them around here, even though they may have a completely different name, are actually created and owned by the same people that own the dealership.
If you are buying used, take the same measures as above regarding picking the potential make and models you are interested in, figure out the price you are willing to pay, and if you can get pre-approved financing set up before you ever walk into the dealership. When you do the internet pricing- and also run it with different mileage so you know what the different prices would be based on different mileage on the cars. Instead of invoice, that will have trade in, what people in your area pay, and retail. Again, you want to shoot for something less than what people pay in your area but anything around that amount is not too bad. You don't want to pay retail. The best thing you can do to negotiate either a new or used vehicle is to know the value and what you are willing to pay before you ever walk into the dealership.
Also, many dealerships now have their used and new inventory listed and searchable on the internet. You should look at that before you ever hit the dealership. Many have an internet sales force and you can negotiate a tentative price before you ever get there, then you go out and look at the car and if you like it you pay the price you negotiated online. I have done that for a family member before and it worked out well. You often can get a really good price that way because they want to get you there- they may try to upsell you when you get there, but be firm on what you want and what you will pay. Be cautious of a dealership that when you gets there can't seem to find the car you told them you were interested in, or claims it was just sold. That can be a bait and switch deal. Not all dealerships are created equal-- some are more honest than others.
It doesn't sound like you will have much of a trade in, but if there is a trade in- you want to price it out on Edmunds as well and know your trade in value. They like to pull the trick of giving you a good price on the car, but then giving you less on the trade in so you make more of a profit. I always tell them that I haven't decided whether I am going to trade in my car and don't give it to them to price it, until I have a firm price on the car I am going to buy. After that, we negotiate on the trade in value. I have threatened to walk out on a poor trade in value before too- they may act like they aren't going to go up-- but they will.
Good luck! It is all about knowing what you want, knowing what you are willing to pay and the fair price , and standing firm until you get what you want! The salesmen who have been at it awhile will quickly realize whether you are someone they can work over and make more money out of, or whether you are someone who has done your research and are not going to fall for the tricks of the trade. A good reputable salesman in my experience is typically not that hard to deal with in getting the right price when they respect you. If you have someone that is trying to work you over, either go to another dealership, or if that is the only dealership in town for that make or if you are set on a specific car there, then talk to a manager and ask for another salesman. I had to do that once, and they were accommodating and they gave me an experienced salesman who gave me respect and what I wanted. That young salesmen kept insisting I negotiate through payment price and insisting that I really wanted to get my financing through them even though I told him no- then when I wouldn't do what he wanted he insisted on quoting price far above the retail- even after I told him I wasn't going to sit there and negotiate for hours, and I knew what a fair price was and that price was ridiculously high. There is really high turnover of car salesman- they have some young newbies who will try to mess with you even when you know your stuff. If a salesman is not giving you respect and is playing games, then don't deal with them and give them the commission. There are good respectable (as far as car salesmen go) salesmen out there, don't get stuck with a bad apple! If they tell you they will not sell it to you for that price, then walk out.