Electrolysis
Electrolysis involves two electrodes in an ionic solution. One electrode is positively charged, the anode, which attracts and oxidizes the anions in the solution. While the other is negatively charged, the cathode, which attracts and reduces the cations in the solution.
When an ion, such as copper, is neutralized it becomes less soluble and precipitates from the solution. When we perform electrolysis on copper sulfate solution, the positively charged copper ions are attracted to the negatively charged cathode. The cathode reduces the copper and neutralizes it, so copper solid deposits around it.
Electrolysis purifies solid copper from the solution. Sometimes we want to purify copper solid, this is done by a process known as electrolytic refining.
Figure 1: Simple diagram of copper sulfate electrolysis