Magnesium is a mineral that is vital to energy production, muscle contraction, nerve function and maintenance of strong bones. Magnesium is found in green vegetables like spinach, as well as whole grains and nuts.