How does electrolysis work?
Electrolysis involves the passage of an electric current through, in general, an ionic substance that is either molten or dissolved in an aqueous solution resulting in chemical reactions at the electrodes. The negative electrode is called the cathode, and the positive electrode is the anode. [1]
An ionic compound is dissolved with an appropriate solvent, or melted by heat, so that its ions are available in the liquid. An electrical current is applied between a pair of inert electrodes immersed in the liquid. Each electrode attracts ions that are of the opposite charge. Therefore, ions (called cations) move towards the cathode, whereas ions (termed anions) move toward the anode. The energy required to separate the ions, and cause them to gather at the respective electrodes, is provided by an electrical power supply. At the probes, electrons are absorbed or released by the ions, forming a collection of the desired element or compound.