"In the Daniell cell, copper and zinc electrodes are immersed in a solution of copper(II) sulfate and zinc sulfate respectively. These two half cells, which support one half of the reaction are often used due to its simplicity. A bulb may connect the two electrodes. Electrons that are “pulled” from the zinc anode travel through the wire, providing an electrical current that illuminates the bulb. In such a cell, the counterions play an important role. Having a negative charge, the anions build up around the anode to maintain a neutral charge. Conversely, at the cathode the copper(II)cations discharge to maintain a neutral charge. These two processes accompany the accumulation of copper solid at the cathode and the corrosion of the zinc electrode into the solution as zinc cations. Since neither half reaction will occur independently of the other, the two half cells must be connected in a way that will allow ions to move freely between them. A porous barrier is used to separate the two solutions while allowing the flow of sulfate ions. When the half cells are placed in two entirely different and separate containers, a salt bridge is often used to connect the two cells. The salt bridge typically contains a high concentration of potassium nitrate (a salt that will not interfere chemically with the reaction in either half-cell). In the above wet-cell during discharge, nitrate anions in the salt bridge move into the zinc half-cell in order to balance the increase in Zn2+ ions. At the same time, potassium ions from the salt bridge move into the copper half-cell in order to replace the Cu2+ ions being discharged."
The link is given below for the electrochemistry and corrosion