The bright core of lightning may be as small as half an inch, but has a temperature three times hotter than the surface of the sun. It is this sudden heating and expansion of the air that produces the sound of lightning, thunder.
Thunder begins as a supersonic shock wave, but decays to an ordinary sound wave in a yard or two.
It is possible to calculate your distance from a lightning bolt. Since the speed of light is extremely fast, the time light takes to reach you is negligible. Therefore, the time delay between the arrival of light flash and the sound of thunder is all due to the time it takes the sound to travel the distance. Therefore, if it takes the thunder six seconds to reach you, the lightning bolt must have been 2 kilometers away.