In every electrolysis, reduction happens at the cathode and oxidation happens at the anode. A memory aid is An Ox, Red Cat: Anode Oxidation, Reduction Cathode.
The cathode is negative, so it attracts positive ions. These ions gain electrons from the cathode and are reduced. For example Cu2+ + 2e- → Cu. The anode is positive, so it attracts negative ions. These ions lose electrons to the anode and are oxidised. For example 2Cl- → Cl2 + 2e-.
The two processes are linked. The electrons lost at the anode travel round the external circuit, through the wires and the power supply, to the cathode. There they are gained by the ions in reduction. The same number of electrons is lost and gained, so oxidation and reduction go on together.