let's say that there are Ag + ions and Zn 2+ present as impurites, together with Cu2+... therefore, if you check out the E value at STANDARD conditions... you'll find that Zn2+ will have the least positive value, followed by Cu2+, and then Ag+...
From my data,
E values for the following ions,
1) Ag+ +0.80V
2) Zn2+ -0.76V
3) Cu2+ -0.34V
Therefore, when you pass a current throught the solution (electroylsis), the Ag+ ions will be reduced to metallic silver becuase of its high E value, it is the most easily reduced... and the Zn2+ remain dissolved in solution as they are not likely to reduced at all due to their low E value...
The impure sample is now placed at the anode, OXIDATION takes place... The Cu metal present at the anode will dissolve into the solution, giving up electrons, in this case 2 electron to each Cu atom... while all the rest of the ions either remains dissolved, or in pure metallic form... the heavy sludge at the bottom of the solution are the pure metals...
At the cathode, REDUCTION tales place... the Cu2+ is waiting to receive the 2 electrons from the anode to be reduced to pure Cu...
Please take note the above only takes place when the electrolyte is Copper(ll) Sulphate and Cu are used as the electrodes...
It will be different if the electrolyte is dilute sulphuric acid..
And a further note, the concentration of the CuSO4 will not change, since Cu only tranfers from the anode to the cathode...