An electrolyte is an ionic compound that is molten or dissolved in water. Its ions are free to move, so an electric current can pass through it. In a solid ionic compound the ions are held in a lattice and cannot move, so a solid does not conduct.
In electrolysis a direct current is passed through the electrolyte using two electrodes. The cathode is the negative electrode and the anode is the positive electrode. Opposite charges attract, so positively charged ions, called cations, migrate to the negative cathode. Negatively charged ions, called anions, migrate to the positive anode.
For example, in molten lead bromide the lead ions, Pb2+, move to the cathode and the bromide ions, Br-, move to the anode.