An ion is an electrically charged particle obtained from an atom or chemically bonded group of atoms by adding or removing electrons.
Although isolated atoms are normally electrically neutral and therefore contain equal number of positive and negative charges, during the formation of certain compounds atoms can become ions.
An atom that picks up an extra electron becomes a negatively charged ion, called an anion .Non metals forms negatively ion that is anions by gaining electrons.
An atom that loses an electrons becomes a positively charged ion called a cation.Metal atoms typically tend to lose electrons to form positively charged ions called cations.
For exampl: Na atom ----> Na+ ion + e-
Ca atom -------> Ca2+ ion + 2e-
a sodium metal atom loses one electron to form sodium cation and a calcium metal atom loses two electrons to form calcium cation.
Cl atom + e- ---------> Cl- ion
O atom + 2e- --------> O2- ion
Chlorine loses an electron to form chlorine anion and oxygen loses two electrons to form oxygen anion.
NOTE : that when an ion is formed the number of protons in the nucleus is unchanged . It is number of electrons that increases or decreases.