What does the () around an element mean, for example

Mg(OH)2

Just like the distributive property in arithmetic, you multiply each element by 2

So, you end up with:
MgO2H2