Lightning is an electric current. Within a thundercloud many small bits of ice bump into each other as they move around in the air. These collisions create an electric charge. After some time the whole cloud fills up with electrical charges, some positive and some negative. Since opposites attract, that causes a positive charge to build up on the ground beneath the cloud. The grounds electrical charge concentrates around anything that sticks up, such as mountains, people etc. The charge coming up from these points connects with a charge reaching down from the clouds and causes lightening.
Comments