The atom is composed of three subatomic particles. The three subatomic particles are protons, neutrons, and electrons. Protons and neutrons are found in the central nucleus of an atom. Electrons are found in either clouds or orbits that surround the nucleus. Here is a diagram of the location and charges of the subatomic particles within an atom.
Each subatomic particle has a different charge. Protons are positively charged, neutrons are neutrally charged, and electrons are negatively charged.
Oppositely charged particles attract one another whereas particles that have the same charge repel one another. Therefore, protons and electrons will attract one another. However, two protons will repel one another. Likewise, two electrons will repel one another. Because neutrons are neutral and have no charge, they will neither attract nor repel either protons, electrons, or other neutrons.