Lightning
Lightning is a spark — the same phenomenon as the tiny zap from a doorknob, scaled up a hundred million times. It exists because thunderstorms are electricity factories.
>The generator
Inside a storm, the updraft hurls small ice crystals upward while heavier, slushy hail pellets (graupel) fall through them. Every collision transfers a little charge: the light crystals turn positive and ride the updraft to the storm's top; the heavy graupel turns negative and gathers in the storm's belly. Millions of collisions per second separate enormous charge — hundreds of millions of volts between cloud top, cloud base, and the ground below.
Air is an excellent insulator, until it isn't: when the electric field grows strong enough, it tears a conductive channel through the air, and the stored charge drains through it in a few thousandths of a second.
>Thunder is the sound of hot air
The bolt heats its channel to roughly 30,000 °C — five times the surface of the Sun. Air that hot expands explosively, and that shockwave is thunder. Light arrives instantly; sound dawdles at ~340 m/s — so count the seconds between flash and boom and divide by three: that's the distance in kilometres. Ten seconds ≈ 3 km — too close to be outside.
Poland records tens of thousands of ground strikes in a stormy summer month. The safe places are a building or a car (the metal shell guides the current around you); the dangerous ones are open fields, water, and lone trees.