What causes static electricity to build up on surfaces?
Static electricity builds up when two materials come into contact and then separate, causing electrons to transfer from one surface to the other. This process, called triboelectric charging, leaves one material with an excess of electrons (negatively charged) and the other with a deficit (positively charged). The effect is amplified by friction, which increases the contact area and frequency of electron transfer.
Certain material combinations transfer electrons more readily than others, which is why rubbing a balloon on hair or shuffling across carpet in socks produces noticeable static. Dry conditions worsen the buildup because moisture in the air normally allows charges to dissipate gradually. Insulators like rubber, plastic, and glass hold charges longer since electrons cannot flow freely through them.