During electrolysis the cathode is the negative electrode and the anode is the positive electrode. Positive ions are attracted to the cathode. When they arrive they gain electrons, and gaining electrons is reduction. So reduction happens at the cathode.
Negative ions are attracted to the anode. There they lose electrons, and losing electrons is oxidation. So oxidation happens at the anode.
A memory aid is that the cathode and reduction both start with a consonant sound, and the anode and oxidation both start with a vowel. In copper chloride solution, copper ions are reduced at the cathode and chloride ions are oxidised at the anode. The electrons released at the anode travel through the wire to the cathode.