Industrial Production of Sodium Hydroxide

In the industrial production of sodium hydroxide, a solution known as brine (really just concentrated NaCl solution) is electrolysed.
At the anode, chloride ions are oxidised (and therefore lose electrons becoming more positive) to form chlorine gas.

2Cl-(aq) → Cl2(aq) + 2e-

At the cathode, sodium ions are not reduced as would be expected. Rather, because the sodium ions are simply too stable to undergo this process, the water in the solution is reduced instead, forming hydroxide ions and hydrogen gas.

2H2O(l) + 2e- → H2(g) + 2OH-(aq)

Through these processes, sodium hydroxide is formed.

Net ionic equation:

2Cl-(g) + 2H2O(l) → Cl2(g) + H2(g) + 2OH-(aq)

Full equation:

2NaCl(aq) + 2H2O(l) → Cl2(g) + H2(g) + 2NaOH(aq)

Remember - Chlorine ions are oxidised at the ions and water, not sodium ions, are reduced at the cathode to form sodium hydroxide from brine.