How do galvanic cells work?

I was wondering how a galvanic cell works


If you look at the picture below, if I have magnesium metal in sulfuric acid, will the metal react with the acid to be then turned into magnesium ions and in the process give away 2 electrons and that is how electrons are given in any cell: the electrode interacts with the electrolyte in the anode and then gives up electrons? And if this is the case, then why wouldn't the zinc replace copper in copper sulfate at the cathode and also give 2 electrons away?


What am I doing that is wrong?


[![galvanic cell](https://i.stack.imgur.com/MDCPY.jpg)](https://i.stack.imgur.com/MDCPY.jpg)




I agree with Ivan it's a really bad galvanic cell and both metals would displace the components of the respective containers .But still one of them is more electropositive than other hence there would be some net flow of electrons .You can also compare cells by comparison of electrode potential of respective half cells which in your case have same sign and hence EMF net would be low .


 0

First of all I think that it would not work. In a galvanic cell they should create an electron potential, but in your cell, half cell would react within itself, so no electron potential will be created. The one with $\ce{Mg}$ and $\ce{H2SO4}$, $\ce{Mg}$ will displace $\ce{H2}$ creating $\ce{MgSO4}$. In a cell it is necessary to have a similar salt in container to the plate we have taken, here it is of $\ce{Mg}$ so that they would not react itself rather react with the one in other half cell. I hope that this will be enough. I am ready to help you further. 


 0