Electrolytes dissociate to form negatively charged anions and positively charged cations.
The ions conduct electricity through the electrolyte.
Cations are attracted towards the negative electrode. They take the excess electrons from the electrode and neutralize themselves.
Anions are attracted towards the positive electrode. They give up the excess
electrons from the electrode and neutralize themselves. The electrolyte dissociates
and the constituent elements of the salt are liberated at the electrodes.