You need to start giving some of your thoughts first and/or explain exactly what you don't understand about the problem. When I give complete answers it means you don't learn how to do these problems yourself; it also means I'm doing your homework for you. The purpose of this web site is to HELP you do your homework. This is the last freebie; start showing your work and your thoughts.
Mg(s) + 2HCl(aq) ==> MgCl2(aq) + H2(g) is a single replacement reaction.
3. Convert everything to ions.
Mg(s) + H^+(aq) + Cl^-(aq) ==> Mg^2+(aq) + 2Cl^-(aq) + H2(g)
4. Mg(s) + 2HOH(l) ==> Mg(OH)2(s) + H2(g)