First balance the molecular equation:Mg(s) + 2HCl(aq) ---> MgCl2(aq) + H2(g)Any molecule that is aqueous (aq) will be present in the solution as its constituent ions. For example:HCl(aq) is dissociated in aqueous solution to give Cl-(aq) and H+(aq) HCl(aq) ----> Cl-(aq) + H+(aq)Using this info you can write out what is called theTOTAL ionic equation, by splitting all the (aq) molecules into their ionsMg(s) + 2H+(aq) + 2Cl-(aq) ------> Mg2+(aq) + 2Cl-(aq) + H2(g)