Magnesium ions, Mg 2+ are linked to ATP (ATP is the chemical that cells use to obtain energy). Over 300 enzymes are known to rely on the catalytic action of the magnesium ions. It is also essential to enzymes that synthesise DNA and RNA.
The average human contains around 24g in their body (1 mole!) and a deficiency of magnesium can lead to asthma, diabetes and osteoporosis.
Leafy vegetables are excellent sources of magnesium as chlorophyll contains a porphyrin ring datively bonded to magnesium.
This image of chlorophyll has been reproduced according to the licence at: http://en.wikipedia.org/wiki/File:Chlorophyll_a.svg