Electrolysis of molten NaCl gives sodium at cathode while aqueous NaCl gives H2 gas at cathode.
Molten NaCl dissociates to give Na+ and Cl-, Na+ then move towards cathode, picks up one electron and gets reduced to form Na.
Na+ +e- ---> Na
In aqueous NaCl, as , it is the hydrogen gas which liberates at cathode.