Yes, magnesium will ract with dilute sulfuric acid, becasue magnesium can be oxidized to Mg (2+) cations and combine with the ion sulfate, SO4 (2-) to form magnesium sulfate, MgSO4.
This is the chemical equation
Mg + H2SO4 ⇄ MgSO4 + H2(g)↑
This is a displacement reaction, where the magnesium metal displaces the hydrogen in the molecule of sulfuric acid and leaves as H2 gas.