Why Do I Get a Shock When I Walk Across a Carpet and Touch a Metal Doorknob?
The tiny electric spark you get when you touch something made of metal, after you’ve walked across a wool carpet is caused by static electricity because two objects rubbing together can create electrostatic charges.
Whenever two different materials rub against each other it is likely that one will leave with more electrons than it started with, the other will leave with less. This is called Triboelectricity (tribo means friction).
Everything is made of atoms, and all atoms have tiny parts called electrons. As you walk, your shoes rub away some electrons from the atoms in the carpet, so that your body becomes charged with extra electrons a charge of static electricity.
If you touch something that can carry away electrons, the charge jumps from your fingertips to the object and you see an electric spark and feel a tiny shock.