beso’s analysis by which a shock is received from a vehicle is not correct.
Although the body of a car is insulated from earth, any build up of static (on the vehicle body) is insufficient to be felt. Some years ago it was shown that those conductive strips people attached between the rear bumper/body to ground did nothing – and the company making them ceased trading.
As you get out of a vehicle, the static charge is built up on your body as a result of the interaction (movement) between your clothes and the car seat material. Having managed to exit the vehicle without touching anything metallic/conductive – your body will have gained a static charge. Many times I have received a shock when I put the key in the garage door lock, discharging the charge.
As the car body is not earthed, the reason you receive a shock when touch the car body is that the static charge on your body is shared equally between you and the car. Since the car is much larger than you, in sharing the charge, most of the charge is now on the car, giving the same effect as discharging to earth.
Since it is quite difficult to exit a car without at least one foot being on the ground – wearing anti-static shoes should also prevent static build up in this situation.