Usually, an atom has an equal number of protons and electrons. Electrons have a negative charge of electricity and protons have a positive charge of electricity. Opposite charges attract, so when materials rub together and one material becomes negatively charged and one is positively charged, static electricity results.