This is not easy to accomplish when you are trying to make as much as possible from a slick car salesperson.
Get your loan lined up before going to a dealership. If you already have a loan when you walk through the door, then the process will be a lot easier.
Know what kind of vehicle you want before stepping foot into a lot. You should look it up on the Internet and be more educated about different kinds of vehicles before you want. This also lets you an idea of the price that you should really be paying for a specific vehicle.