Atoms become ions by gaining or losing electrons. When two ions join together, they form a bond known as an ionic bond.
Protons have positive charges, and electrons have negative charges. When an atom has an equal number of the two particles, the atom has no net charge. If an atom loses an electron, it has one more proton than electron, giving it a net positive charge. An ion with a net positive charge is called a cation. If an atom gains an electron, then it has one more electron than proton, giving it a net negative charge. An ion with a net negative charge is called an anion.