This is otherwise known as electrolysis lol, It's what happens when a postively charged ion moves towards the negative electrode during electrolysis. When this happens Negatively charged ions move to the Positive electrode. The often both lose electrons and become oxidized. The left over broken down substance is called Electrolyte.