Image Taken From: http://www.eng.tau.ac.il/eng/Departments/Inter/edp_lab/photogal_files/
Thunder is the sound of a lightning discharge. It is produced as the lighting bolt suddenly heats the surrounding air to temperatures around 10,000°C (18,000°F). This causes an explosive expansion, which sends out a wave of compressed air (a sound wave). Lightning is often seen long before its thunder is heard. This is because sound travels at about 343 m/s though air, much more slowly than 3.00x108 m/s, the speed of light. While a lightning strike takes less than a second to complete, the sound of its thunder often lasts much longer. There are many reasons for this. The shape of the lightning bolt is a major factor, as all parts are not an equal distance from the listener. Sound produced by closer portions of the bolt will be the first of the thunder a listener hears, and sound produced by portions of the bolt that are farther away will be heard later. Another factor is that objects on the ground interfere with the sound, and echoes from hills and other objects can perpetuate thunder. Often lightning occurs in groups, so the sounds from multiple bolts sometimes overlap to cause longer lasting thunder.