If you're asking what I think you're asking, then you're dealing with a neutralization reaction.
A neutralization reaction is said to take place when a base reacts with an acid to form salt and water.
In your case, sulfuric acid,
#"Mg"("OH")_ (2(s)) + "H"_ 2"SO"_ (4(aq)) -> "MgSO"_ (4(aq)) + 2"H"_ 2"O"_((l))#
Now, you can get a sense of why this is a neutralization reaction by looking at the net ionic equation.
Magnesium hydroxide is a weak base, which means that it does not dissociate completely in aqueous solution to form magnesium cations,
Instead, an equilibrium will be established between the undissolved solid and the dissolved ions
#"Mg"("OH")_ (2(s)) rightleftharpoons "Mg"_ ((aq))^(2+) + 2"OH"_((aq))^(-)#
Sulfuric acid, on the other hand, is a strong acid, so it will ionize completely in aqueous solution to release hydrogen ions,
#"H"_ 2"SO"_ (4(aq)) -> 2"H"_ ((aq))^(+) + "SO"_(4(aq))^(2-)#
These hydrogen ions will react with the hydroxide anions and essentially neutralize each other, hence why this is a neutralization reaction.
In turn, this will drive magnesium hydroxide's dissociation equilibrium further to the right, which in turn will produce more hydroxide anions and dissolve the solid.
The magnesium cations and the sulfate anions are spectator ions because they exist as ions on both sides of the equation. you will have
The net ionic equation will thus be
#color(green)(|bar(ul(color(white)(a/a)color(black)(2"OH"_ ((aq))^(-) + 2"H"_ ((aq))^(+) -> 2"H"_ 2"O"_((l)))color(white)(a/a)|)))#
Now, it's worth noting that a neutralization reaction is actually a particular case of a double replacement reaction.
As you know, double replacement reactions involve the exchange of ions between two compounds. In this case, the magnesium cations trade places with the hydrogen cations.