Electrolytes are formed when the components in a salt compound dissociate in a process called solvation. Electrolytes have several properties that can be utilized in the process of electrolysis as a means of separating and extracting the elements and compounds present in a solution.
When electrodes are used to apply voltage to an electrolyte, it conducts electricity. Lone electrons cannot pass through the electrolyte but a chemical reaction takes place at the cathode instead due to consumption of the free or extra electrons at the anode. Another chemical reaction occurs at the anode that leads to electrons being transferred to the cathode. This process leads to the development of a negative charge cloud around the cathode and a positive charge around the anode. This causes the ions in the electrolyte to move either way according to their electrical charge and neutralize these charges in order to keep electrons flowing and the reaction continuing.
Sodium chloride in water
For a solution of sodium chloride in water, the reaction at the cathode would be the addition of two electrons (2e−) to two molecules of water (2H2O) to give two hydroxyl ions (2OH−) and a hydrogen (H2). The hydrogen gas would then bubble up.
At the anode, the reaction is the dissociation of sodium chloride into two molecules of sodium (Na+) and chlorine (Cl2), which would be liberated as a gas.
Finally, the positively charged sodium ions (Na+) move to the cathode and neutralize the negative charge of OH− that is present there and the negatively charged hydroxide ions OH− move towards the anode, neutralizing the positive charge of Na+ that is present there. Without the ions from the electrolyte, this flow of electrons would not continue.
Further Reading