Static electricity is caused when objects or particles make contact and either gain or lose electrons due to friction, and the charged object discharges into a nearby object. Rubbing objects together increases the contact area. Examples of static electricity include touching a doorknob in cold weather and receiving a shock.
Typically severe static electricity occurs in cold, dry areas. These conditions make air much less likely to conduct electrical charges. In moist air, a charge dissipates without notice because water conducts electricity. Dry air lacks this conductivity, so a charge continues to build up on objects until it is intense enough to overcome the natural resistance of air over short distances. Static is not just a small charge. The most visually striking display of static electricity is lightning, which reaches for miles from clouds to the ground. A charge can be either positive or negative, but electrons, the negatively charged particles, are what flow from one place to another.
Static electricity can be dangerous to delicate circuits such as a computer motherboard. This is why people working with computers ground themselves before touching any of the internal parts. By touching a metal surface, the person dissipates any built up, excess charge.