If you have a small dog or cat, it's best to put them in a pet carrier. It sounds cruel, but you'll find that the pet will grow accustomed to it, and associate it with safety. My Jack Russell gets excited whenever I get the pet carrier, because she knows she off for a ride.
For big dogs, it's best to put them in the boot (trunk) and place a metal grate across the back seats, to stop them from climbing out. Make sure they have something soft to sit on, and provide water if its a hot outside.
Remember, if you stop off anywhere and keep the pet in the car, make sure to leave a window open fractionally, as there is a danger of your pet dying from overheating on a hot day.