How is the element Magnesium made or acquired?
The most common ores are forms of magnesium carbonate.
Note that the occurrence of magnesium as a carbonate illustrates a chemical principle. Most carbonates are insoluble; therefore we can mine metal carbonates.
Once you have the ore mined, you still have to reduce the magnesium ion to give the metal. The ores are treated with (vast) quantities of hydrochloric acid to give