Static electricity is the buildup of electrical charge in an object. Sometimes static electricity can suddenly discharge, such as when a bolt of lightning flashes through the sky. Other times, static electricity can cause objects to cling to one another. Think of how socks fresh out of the dryer stick together. This happens when objects have opposite charges, positive and negative, which attract.