Theory:

When ionic substances are dissolved in water to form a saturated aqueous solution, their ions attract water molecules, which are then chemically attached in a specific ratio. This is known as hydration.
 
These ionic substances crystallise from their saturated aqueous solution with a specific number of water molecules.
The number of water molecules found in the crystalline substance is called water of crystallisation. These salts are known as hydrated salts.
When these hydrated crystalline salts are heated, they lose their water of crystallisation and become amorphous or lose their colour (if they are coloured).
 
1.png
(a) Crystalline hydrated salt   (b) Amorphous anhydrous salt
  
Let us see some of the common hydrated salts:
 
Common Name
IUPAC Name
Molecular formula
Blue Vitriol
Copper (II) sulphate pentahydrate
\(CuSO_4.5H_2O\)
Epsom Salt
Magnesium sulphate heptahydrate
\(MgSO_4.7H_2O\)
Gypsum
Calcium sulphate dihydrate
\(CaSO_4.2H_2O\)
Green Vitriol
Iron (II) sulphate heptahydrate
\(FeSO_4.7H_2O\)
White Vitriol
Zinc sulphate heptahydrate
\(ZnSO_4.7H_2O\)
  
Copper sulphate pentahydrate \(CuSO_4.5H_2O\) (Blue vitriol):
  
Blue vitriol contains a total of five water molecules. As a result, its water of crystallisation is \(5\). When blue copper sulphate crystals are gently heated, they lose their five water molecules and transform into colourless anhydrous copper sulphate.
  
 CuSO4.5H2OCoolingHeatingCuSO4+5H2O(Coppersulphate(AnhydrousCopperpentahydrate)sulphate)
 
4.png
(a) Copper sulphate before heating (b) Copper sulphate after heating
 
When adding few drops of water, or the mixture is allowed to cool, the colourless anhydrous salt transforms into blue-coloured hydrated salt.
 
8.png
Anhydrous copper sulphate turns blue when water is added.
  
Magnesium sulphate heptahydrate \(MgSO_4.7H_2O\) (Epsom Salt):
  
Epsom salt's water of crystallisation is \(7\). When magnesium sulphate heptahydrate crystals are gently heated, seven water molecules are lost, and magnesium sulphate becomes anhydrous.
 
MgSO4.7H2OCoolingHeatingMgSO4+7H2O(Magnesiumsulphate(AnhydrousMagnesiumheptahydrate)sulphate)

When adding few drops of water, or the mixture is allowed to cool, the colourless anhydrous salt transforms into hydrated salt.