Walking across a carpeted floor and getting a shock when touching a door knob or other metal object is an example of static electricity. Clothes stuck to one another after being in the dryer is another example of static electricity.
Static electricity is essentially the electric charge of a surface or material being out of balance. Everything is made up of atoms and atoms contain protons, neutrons and electrons. Protons have a positive charge, electrons a negative charge and neutrons are neutral meaning they have no charge. When two objects are rubbed against one another, electrons can transfer from one object to another. This builds up static electricity.
If a person wearing a wool hat removes the hat, her hair becomes electrically charged. The wool rubs against the hair when the hat is removed, transferring electrons from the person's hair to the hat. This leaves the hair positively charged. With electricity, opposites attract, and things that have the same charge repel. The positively charged hair stands on end and sticks up because it is repelled by the other positively charged hairs on the head. The more rubbing between two objects, the more static electricity build up and the larger the electrical charge.