Cations (positively-charged ions) and anions (negatively-charged ions) are formed when a metal loses electrons, and a nonmetal gains those electrons. The electrostatic attraction between the positives and negatives brings the particles together and creates an ionic compound, such as sodium chloride.
Sodium is a chemical element with symbol Na (from Latin natrium) and atomic number 11. It is a soft, silvery-white, highly reactive metal. Sodium is an alkali metal, being in group 1 of the periodic table, because it has a single electron in its outer shell that it readily donates, creating a positively charged ion—the Na+ cation.