Usually, atoms have the same number of electrons and protons. Then the atom has no charge, it is "neutral." But if you rub things together, electrons can move from one atom to another. Some atoms get extra electrons. They have a negative charge. Other atoms lose electrons. They have a positive charge. When charges are separated like this, it is called static electricity. So, why does your hair stand up after you take your hat off? When you pull your hat off, it rubs against your hair. Electrons move from your hair to the hat. Now each of the hairs has the same positive charge. Things with the same charge repel each other. So the hairs try to move away from each other. The farthest they can get is to stand up and away from all the other hairs.