Electrolysis makes the anions (negative ions) go to the anode (positive electrode) and the cations (positive ions) go to the cathode (negative electrode). So, for example, oxygen would go to the anode and iron would go to the cathode. 