On passing electric current through the electrolyte cations move towards the cathode and anions move towards the anode.
On reaching their respective electrodes these ions loose their charge. On loosing their charge they get deposited on the electrode or discharged as a gas.
Hope this helps :)