Have you ever walked on a thick carpet and then gotten a shock when you touched something metal? Static electricity occurs when electrons are rubbed off of one surface onto another. If one of the surfaces is you, you will get a shock when you touch something that is a good conductor connected to the ground.