Electrical storms have been the subject of research since Benjamin Franklin, two centuries ago, intuited that lightning was an electrical discharge. However, despite the theoretical and experimental instrumentation advances, there are still aspects for which there is no definitive explanation. The lines that follow are within what is today considered the most plausible explanation.
Thunderstorms occur when there are vertically growing clouds. These clouds are mainly formed by the rise of heated air on the mainly liquid surface of the Earth. The cloud will continue to grow in height as long as it is fed warm air. If this air is humid, when it reaches high areas, where the temperature is low, the water vapor condenses into drops. Higher up, the water droplets turn into ice. Simultaneously, cold air enters its interior through the upper area of the cloud, which weighs more than the hot air, descends towards Earth. Therefore, we have a double circulation, that of hot air upwards and that of cold air downwards. In addition, the drops of water and pieces of ice due to the two air currents, have a turbulent movement within the cloud, until, when they reach enough weight, they fall on the ground in the form of rain or hail. This complex cloud is called a cumulonimbus and is several kilometers high. During this process of cloud formation, static electric charges are produced and separated within it. The positive ones are located in the upper part and the negative ones in the lower part. In parallel, the surface of the Earth, by a complex process, becomes positively charged.
We already have the conditions, almost necessary, for a thunderstorm to occur. Earth positively charged, the lower part of the cumulonimbus negatively charged and the upper part positively. For positive and negative charges to interact, the air between them, which is insulating, needs to become conductive. The cloud helps this change. Its electric charges generate around it an electric field that, when it is strong enough, is capable of pulling electrons from atoms and molecules in the air. Air is said to ionize and become conductive. At that moment, millions of trillion electrons from the cloud travel in milliseconds towards the Earth in zigzag movements. Electron paths are illuminated by a purplish glow (lightning) that is typical of ionized air molecules. Simultaneously with the light, there is a very strong heating of the air (temperatures higher than the surface of the sun) that causes its expansion at very high speed. This expansion is what gives rise to thunder. The time that passes from when we see the lightning until we hear the thunder allows us to calculate how far away the storm is. We have explained cloud-ground lightning, but cloud-cloud lightning can also be produced, within the cloud, cloud-air, and ground-cloud. For another day, the operation of the lightning rods is also pending.