Though lightning is the true thing to fear in a thunderstorm - well, that and high winds, at times - the aspect of a storm most people seem to fear most is the thunder. A mighty clap of terrible sound emanating from the sky, thunder is undeniably shocking and quite scary, especially to younger kids and pets who don't necessarily understand what's going on.
And who's to blame them? Historically speaking, perhaps even biologically speaking, loud noises are seldom a sign of something good coming along. Indeed, loud noises typically shock and send people running. Instinctively humans fear loud noises because they indicate a nearby threat or some unknown factor. Hearing a bunch of them in tandem is not a good thing, and it takes a lot of conditioning - namely, a lot of storms - to really settle down around thunder. It also helps to know what thunder is.
To describe thunder you first need to know what lightning is. In layman's terms, lightning is a bolt of electricity that streaks down from the sky during a storm. How lightning forms in the storm clouds above is a subject of debate that hasn't been quite resolved, though most hypotheses regarding lightning depict it as the result of interactions between ice crystals in the clouds and falling drops of water, pulled up as water vapor and changed by the cooling air of the atmosphere. Their exchanges create a mounting charge of electricity in the clouds, and when the electrical field generated gets strong enough lightning begins to form, cutting the sky with some rather fantastic visual displays.
The results of lightning can be catastrophic, depending on where it hits, though lightning also creates another, somewhat harmless byproduct that nevertheless turns into the subject of this article: thunder. Without lightning you don't have thunder.
Thunder is the result of the electricity coming down out of the sky. Lightning bolts can carry millions of volts worth of electricity, all crackling down towards the ground in an instant, and in carrying that much electrical energy lightning can quickly super heat objects - including the air. And when air is heated, what does it do? It expands.
Herein lies the key. Lightning generates so much heat and in such a short time that the air expands incredibly for a few seconds, releasing a massive, popping shock wave of sound. This is thunder, that which some people fear most about thunderstorms. It's simply a byproduct of lightning, and quite harmless since it's a) high in the air and b) quite short in duration. Indeed, people who are too far from a storm won't even hear the thunder, which is a good indication of the storm's proximity compared to the listener.
Even though thunder is harmless, it also means that lightning is striking, and that more is probably on the way. Heed the warning and get indoors as quickly as you can before lightning comes knocking on your noggin.