Lightning in a thunderstorm occurs because the freezing process that takes place at upper levels of the storm separates positive and negative charges. The action of rising and descending air in the updrafts and downdrafts of the storm separates these charged particles further, and allows broad areas of negative and positive charge to develop within a thunderstorm. Lightning results from the build-up and discharge of electrical energy between positively and negatively charged areas of the storm, and between charged portions of the storm and the ground.