When electrolysis takes place in molten NaCl, it splits into two types of ions,
NaCl ------> Na+ + Cl-
a) The half reaction that happens at cathode is reduction of Na+ ions
2Na+ + 2e = 2Na (l)
Na+ gets reduced by taking electrons and forms liqid metal that floats above the cathode
b) In the other half reaction at anode, Cl- loses electrons and gets oxidized by forming Cl2 gas
2Cl- -2e = Cl2(g)
We get the bubbles of Cl2 at anode.