If you were an alien who had learnt everything you know about Earth from watching TV and movies you would probably think that the sole purpose of a car's petrol tank is to explode.
It doesn't take much to cause a movie petrol tank to explode: a serious crash, a well-placed gunshot or even a lightning strike1 will do it; and driving the car off a cliff makes it an absolute certainty.
Reality is far more boring. Petrol tanks are specifically designed with safety in mind: most are produced from tough plastic (HDPE to be exact) and have built-in features that ensure that the mixture of liquid fuel, fuel vapour and air never reaches the flammability limit (petrol must be between 1.4% and 7.6% (by volume) in air in order for it to catch fire). Petrol does not usually detonate as explosives do, but rather it deflagrates, burning subsonically (below the speed of sound) and therefore not creating a shock wave.
In certain circumstances petrol can explode, especially if trapped in a sealed container (petrol tanks have relief valves to prevent this) which can create a BLEVE (pronounced "blevvy") which stands for Boiling Liquid Expanding Vapour Explosion2 in which a sudden change in pressure inside the tank causes the liquid fuel to turn into vapour, causing the container to explode and releasing a cloud of vapour that can then ignite, causing a (usually larger) secondary explosion.
1 This is despite the fact that inside a car is one of the safest places to be in a lightning storm.
2 Also known to some as "Big Loud Explosion, Very Exciting!".