From my understanding of how it works, for one: - it is a mineral that grabs onto water molecules, and it also grabs on to calcium.
This is handy. When calcium absorbs into your blood (because of vitamin D, for one) magnesium helps carry it all the way to your bones to absorb there where you want it. Otherwise calcium might drop off in your veins (you don't want that) or calcium can turn into kidney stones (ouch!).
Magnesium can dissolve calcium that is already built up in your veins.
It also will help keep your heart beating during a minor heart attack. Often times, during a heart attack, your heart does the dumbest thing it could - it just goes spastic and loses its pumping action. Magnesium helps override that and helps the heart pump even when it's getting the reduced blood flow (but if you've got a major heart attack - forget it).
This mineral is usually found in abundance in natural water, but for some reason it is naturally low in America's water sources. There has actually been talk of artificially fortifying city water with it. It comes cheap in a pill, until then.
You can overdose on magnesium, of course. After your body has absorbed all it will, the rest will just go out your backside - and since it's still bonding with water, you'll have diarrhea. You don't want that. Don't overdo anything, anyway.