Answer:
The production of a chemical reaction by passing an electric current through an electrolyte is called electrolysis. We know that an electrolyte contains ions, which are charged. The positively charged ions are called cations, because they are attracted to the cathode, and the negatively charged ones are called anions because they are attracted to the anode. We know that unlike charges attract and like charges repel. Cations, being positively charged, get attracted to the negatively charged cathode and move toward it. Anions, being negatively charged, get attracted to the positively charged anode and move toward it. This explains how ions move in an electrolytic cell, and thus ‘conduct’ an electric current. A chemical reaction takes place at the anode and the cathode. This can be observed as the formation of bubbles (due to the production of gases) or deposition of metal on the electrodes or a change in the color of the electrolyte. The reaction varies depending on the metals used for the electrodes and the electrolyte chosen. Electrolysis of a solution of sodium chloride (NaCl) produces hydrogen gas (H2), chlorine gas (Cl2), and sodium hydroxide (NaOFI).
The pictures of electrolysis examples are shown below: