Because the atmosphere is not a perfect insulator, there is a small current between the electrosphere and the Earth. Negative charge leaks from the Earth and rises to the electrosphere. This is called the fair weather electric and it is about 2000 amps at any given moment. At this rate, the Earth's charge would dissipate in less than an hour, but, as it turns out, lightning recharges the Earth's by delivering negative charge back to the surface. There are roughly 2000 thunderstorms in progress around the world at any one time producing about 30 to 100 cloud to ground flashes each second or about five million flashes a day.
Lightning is associated with convective activity.
Cumulonimbus clouds are the largest form of convective cloud and typically produce lightning. Cumulonimbus clouds with lightning activity are generally referred to as thunderclouds. The classical thundercloud model can be described as a positive electric dipole with a positively charged region above a negatively charged region. The upper positive centre, P, occupies the top half of the cloud. The negative charge region, N, is located in the middle of the cloud.