If you've ever walked across a carpeted floor, touched a metal doorknob, and received a painful shock, you've experienced the equivalent of being struck by a tiny bolt of lightning. Granted, this sensation is nothing like the shock that would be generated by a 25,000-degree-Celsius lightning strike, but both phenomena are the result of static electricity.
As you walk across carpet, your feet disturb some of the atoms that make up its fibers, which dislodges some of the electrons in those atoms. In some cases, the exchange of electrons between atoms in the carpet and atoms in your shoes is equal. Sometimes, though, the carpet's atoms give up their electrons far more readily than the atoms in your shoes do. When this happens, your shoes and the rest of your body gain electrons and become negatively charged, while the carpet becomes positively charged. If your accumulated negative charge becomes high enough and you come into close contact with a conductor -- an object or substance through which electrons move easily -- the excess electrons may jump to that substance and give you a slight shock.
Lightning works in much the same way. Storm clouds can form when humid, warm air near the ground rises to meet cooler air above. As these separate air masses churn together, atoms near the top of the cloud lose electrons and become positively charged, while those near the bottom gain electrons and become negatively charged. At the same time, the negative charge at the cloud's bottom repels negative charges on the ground, causing the area directly below the cloud to take on a positive charge. When the bottom of the cloud has accumulated enough of a negative charge, electrons in the cloud move rapidly toward the ground, completing the cloud-ground connection. As the electrons move downward, they collide with atoms and molecules in the air. It's these high-energy collisions that produce the characteristic crackling light we associate with lightning strikes.
Demonstrate the spark effect of static electricity in this NOVA classroom activity