Electrolytic Cell
An electrolytic cell consists of two electrodes connected to a battery. In an electrolytic cell electrical energy is converted into chemical energy.

The process of decomposition of an electrolyte into its ions when an electric current is passed through it, is called electrolysis.
When electricity is passed through an electrolyte, a chemical change i.e. decomposition of the electrolyte into ions takes place at the electrode. Oxidation and reduction reactions occur in the cell.
In the electrical field Cl– ions migrate to the +ve electrode (anode) and undergo oxidation by loosing electrons. Na+ ions go to –ve electrode (cathode) and undergo reduction.
Oxidation at Anode:
Cl– → Cl + e
Cl + Cl → Cl2 (g)
Reduction at Cathode:
Na+ + e → Na