Buy used.
And if you buy used, make sure it's at least three years old as most of the car's depreciation happens in the first three years.
If you go to a dealership, go at the end of the month on a Tuesday or Wednesday as those are slow days and most dealers are trying to fulfill their quota, so they're more likely willing to really negotiate pricing.
Know EXACTLY what you want to pay in the end. If they ask, say, "my total budget is $xx,000 out the door." If you said "my budget is $xx00 a month" they'll get you that monthly price, but on a longer loan time (72 months vs 48 months) which will mean you'll end up paying like $10k more in the end.
If you're going to finance your car, go to your bank FIRST and get pre-approved for an amount you're willing to pay, that way your credit score will take the smallest hit possible (hard inquires will always have an affect your score). Dealerships will say they'll get you the best deal then run your credit through a bunch of different lenders which will drop your score by 50-60 points, which will affect your credit approval anywhere else, therefore effectively locking you into their dealership and pricing. And then you can kiss any deal goodbye.
You're not on the hook for the car until you sign that contract. Even if they get you into the back office to negotiate, if you haven't signed anything, you can just walk out. Don't feel bad about wasting their time because in the end, it's YOUR money.
If you need something dependable, Toyota and Honda. American cars (other than those huge ass trucks) are trash. They're usually the top 8 of 10 of worst cars as they'll constantly need maintenance and the such.