During the electrolysis of brine (sodium chloride solution), the negative electrode (cathode) attracts positive sodium ions and produces hydrogen gas through the reduction of water, while sodium hydroxide remains in the solution. Chlorine gas is produced at the positive electrode (anode).