(a) An electrically-charged atom (or group of atoms) is called an ion. it is formed by the loss or gain of an electron by an atom.
Ions are of two types: cations and anions.
For example: A sodium ion (Na+) is formed when a sodium atom loses one electron. A sodium ion is a cation.
A chloride ion (Cl-) is formed when a chlorine atom gains one electron. A chloride ion is an anion.
(b) (i) The charge on a cation is positive.
(ii) The charge on an anion is negative.
(c) The cation present in MgCl2 is a magnesium ion that is represented as Mg2+ and the anion present is a chloride ion that is represented by Cl-.