Ion is different from an atom since an atom is an electrically neutral specie with an equal number of positive protons and negative electrons.
However, if an atom or a molecule loses or gains electrons, its electron number varies, creating a charged specie called an ion.
If an atom gains negative electrons, it forms a negatively charged ion called an anion. (Mnemonic- n in the anion stands for negative).
Similarly, suppose an atom or a molecule loses its electrons. In that case, the balance between proton and electron is lost to create a positive proton excess leading to the formation of a positively charged ion called the cation. (Mnemonic- t in the cation looks like +.)
The number of electrons lost or gained is indicated as a superscript above the atom's symbol. The magnitude is always written before the sign.
For example, in Ca2+, the 2+ (magnitude 2 and sign +) in the superscript indicates the two electrons lost by the Calcium atom. The other equivalent way of representation is as Ca++.
Similarly, in O2-, 2- (magnitude 2 and sign -) in the superscript denotes the two electrons that are gained by the oxygen atom.
Few more examples of cations and anions are- Li+, Na+, Ca2+, Al3+, F-, Cl-, O2-, N3-, etc.
The magnitude of monovalent ions is usually omitted. For example, the Li cation is Li+ and not Li1+.
The mutual attraction of oppositely charged ionic species can form strong, stable chemical bonds like the ionic bond.