Thunder is the result of lighting. Lighting is a result of electrical charges. Lighting is attracted to the tallest tip of a conductor. Trees are often the tallest objects within an environment. Therefore, trees make great targets for lighting. However, trees do not contain as many ions as humans do. Thus, humans are better conductors than trees. If the tip of a tree is struck by lighting and a person is standing under the tree, then the current from the lighting may travel down the tree and jump towards the human conductor. Therefore, it is not wise to stand under a tree during a thunderstorm.
Lighting is an electrical current that is a result of positive and negative charges that build up in a cloud. The water drops that make up a cloud are constantly moving. Therefore, they collide into one another. This causes the particles to become charged. Eventually, the positive charges within a cloud move toward the top of the cloud. The negative charges migrate towards the bottom of the cloud. Eventually, opposite charges within the cloud, or between the cloud and the ground, attract one another.
The air that surrounds the lighting experiences a rapid increase in pressure and temperature. This causes the air to expand quickly. This “pop” of the atmosphere is what we hear as thunder.