When an atom gains one or more electrons, a negatively charged ion is formed. Positively charged ion is called cation, and the negatively charged ion is called anion. Thus, A cation (positively charged ion) is formed when an atom loses one or more electrons.
An anion (negatively charged ion) is formed when an atom gains one or more electrons.
When sodium atom (Na) loses one electron, sodium ion (Na+) is formed. Sodium ion (Na+) is positively charged. The Na+ ion is a cation.
Na → Na+ + e–
When chlorine (Cl) gains one electron, a chloride ion (Cl–) is negatively charged. The Cl– is an anion.
Cl + e– → Cl–