Definition
Electrolysis occurs when electricity gets with water to cause chemical changes
Electrolysis only occurs within molten ionic compound or a aqueous solution
Anions And Anode
Anions are ions that want more electrons
Anode is when they get with anions in the process of electrolysis
Cation And Cathode
Cation are particles that give out electrons to anions, while anions get it from cations
Cathode attracts cation in the process of electrolysis
Electrolysis : Process

As you can see this is copper inside a liquid solution, the positive sign of copper is cathode and the negative sign of copper is anode
As there is chlorine and sodium, the negatively charged chlorine gets with cathode and positively charged sodium gets with anode
This causes chemical changes