Electrolysis is an example of redox reaction because it involves oxidation and reduction reactions at the electrodes. At cathode, cations are reduced as they receive electrons from the electrode. At anode, anions get oxidised by donating electrons to the electrode. The number of electrons received by anode and the number of electrons released by the cathode are equal.
Let us take an example of electrolysis of molten lead bromide. The reactions which take place at cathode and anode are:
Reaction at cathode: Lead ions get 2 electrons from cathode and reduce to lead metal at cathode. Thus the cathode electrode gets a thin grey coat of lead metal.
Reaction at anode: Bromide ions loses 2 electrons to anode and oxidise to bromine atoms, that combine together to form red vapours of bromine molecule at anode.