During electrolysis oppositely charged species move towards electrodes i.e., cation (+vely charged ion) move towards cathode (-vely charged electrode) and vice versa.
Oxidation takes place at anode (loss of e−)
Reduction take place at cathode (gain of e−)