Don't finance 100% of a vehicle purchase. If you can get 10-15% (preferably more if you can afford it) down you have a better chance of never being under water on the loan.
Do your homework beforehand. Check what a similar vehicle is selling at auction for as that's likely roughly what the dealer has in the vehicle. Pull KBB value and things on the vehicle to have an idea what its worth. If helpful, have listings from other dealers of the same vehicle if they help your cause. Some dealers overprice vehicles and then give higher trade-in values. Others skimp on trade-in but pass that on to the next buyer of the vehicle.
The most important thing? YOU CAN WALK AWAY. You have the power in negotiations. If the vehicle just hit the lot, they're not going to be willing to "discount" it as much as something that has sat for awhile. They'll take a lower margin on the car that's sat for awhile so they can replace it with a car hopefully won't sit as long.
If they can't meet you in money, don't be afraid to negotiate for accessories (mats/remote start/hitch receiver/bed liner/etc.). If you're wanting for example WeatherTech mats, build it in so the dealer gets them for you or at least gets them to you at cost instead of paying retail for them.
Have the dealer run financing options. Don't just say, "my bank will do this at 2.9%." The dealer may be able to do better with Ally or another financing company.
If you have a trade-in, all you care about is the net. If one dealer offers $2k more for trade-in but $2k more on sale price it's the same as the other dealer. Sales tax is calculated on net, not purchase price of the vehicle.