A bolt of lightning is a very short duration AC discharge of a very high voltage.
There have been many reasons postulated as to why we are safe during a lightning storm inside our cars. One of them is that the rubber tires of cars is a very good insulator. The second is that the metallic body of the car is equivalent to a Faraday Cage which limits the current to outside it. The reasons mentioned though are not accurate. First, rubber is an electrical insulator, but a lightning bolt that has travelled through several kilometers of air which is a better insulator than rubber is not going to be stopped by a few centimeters of rubber. Second, the phenomenon of the Faraday Cage is for static electricity, not AC that makes up a lightning bolt.
The right reason why we are safe from a lightning strike if we are in our cars during a lightning storm is the fact that as lightning has a very high frequency it travels only through a very thin outer layer of the metallic body of the car. This is called the skin effect.
It is the Skin Effect that protects us if we are seated in a car which has a body made completely of metal.