Magnesium is a mineral that is important for normal bone structure in the body. People usually get magnesium from their diet, but sometimes magnesium supplements are needed if magnesium levels are too low. Dietary intake of magnesium may be low, particularly among women. Low magnesium levels in the body have been linked to several illnesses such as osteoporosis, high blood pressure, clogged arteries, hereditary heart disease, diabetes, and stroke. In general, magnesium pills are most commonly used for constipation, as an antacid for heartburn, for low magnesium levels, for pregnancy complications called pre-eclampsia and eclampsia, and for a certain type of irregular heartbeat (torsades de pointes). Magnesium supplements may improve a number of health markers, such as blood pressure and blood sugar control. Furthermore, it may also reduce your risk of health conditions such as heart disease, migraine, and depression.