This phenomenon is known as static electricity. What is occurring has absolutely nothing to do with your clothing, this is a myth. What is occurring is your car builds up a static electric charge via your car's tyres as it moves, this static charge is present all over your cars metal skin and transfers to your body as it builds up.

As you alight from the vehicle, this static charge dissipates from your body and your body assumes the static charge of the pavement as you step out. The charge on the pavement is at a lower energy level, generally called Earth Potential and your body then assumes this energy level. If you touch the car however, the car's energy level will dissipate through your hand and you feel the jolt as it suddenly builds up from the car to you then as you touch the ground with your feet it rapidly dissipates.

To avoid the jolt simply hold the metal of the door first before you step out. This will allow your body to maintain the car's energy level as you step out then as your feet touch the ground the energy dissipates through your feet to the ground and you won't feel any jolt. Try it, it really works.