Thunder sometimes sounds like one violent crack.
Other times it rolls across the sky for several seconds.
The difference comes largely from distance, the shape of the lightning channel, and the way sound travels through the atmosphere.
A lightning bolt can be enormous
A visible lightning channel is not necessarily one short spark.
It can extend for miles and branch in several directions.
Different parts of that channel sit at different distances from you.
Sound from the closest section arrives first.
Sound from farther sections arrives later.
Your ears blend those arrivals together into a rolling rumble.
Why does nearby thunder sound like a crack?
If lightning strikes very close, much of the sound reaches you within a short time.
That produces a sharp, sudden bang or crack.
The farther away the lightning is, the more spread out the sound arrival tends to become.
A thunderstorm can therefore sound very different as it approaches and then moves away.
The atmosphere changes the sound too
Sound does not travel through perfectly uniform air.
Layers of air can have different temperatures, wind speeds, and densities.
Those differences can bend, weaken, or redirect sound waves.
Terrain, clouds, buildings, and other surfaces can also affect what reaches you.
That adds more complexity to the rumble.
Are the repeated sounds separate lightning strikes?
Sometimes they are.
Thunderstorms can produce many flashes close together.
But one long rumble can also come from a single lightning event because the sound from its different sections reaches you at different times.
You cannot reliably count thunder rumbles and assume each one represents a different bolt.
Why can thunder seem to fade in and out?
As sound spreads, some frequencies weaken more quickly than others.
Atmospheric conditions can also allow certain parts of the sound to reach you better than others.
The result may be a rolling sound that grows, fades, and briefly grows again.
Does thunder keep going after the lightning is over?
The lightning itself is extremely brief, but the sound may continue arriving for several seconds.
That is because the sound is still traveling from distant parts of the channel.
The event ended.
The receipt is still arriving.
So thunder rumbles because one enormous lightning path can send sound toward you from many different distances.
Your ears receive the bolt piece by piece.
A related part of the natural world appears in Why do we see lightning before thunder?, where the same kind of physical or biological reasoning answers another familiar question.
And that’s the short explanation.
Related explanations: Why do we see lightning before thunder?, Why does rain smell so good?, and Why do puddles disappear?