Magnesium Mg is an element with a boiling point of 650 degree Celsius. The state of metals at room temperature depends on the bonds known as molecular bonds. Magnesium has a high molecular bond.
The basics of why things are in the state they are in, depends on what kinds of intermolecular bonds are present. Magnesium has ionic bonds present as one of the types of intermolecular bonds. Since ionic bonds are very strong they require a lot of energy to break them - because of this Magnesium is likely to stay solid over a long period of time :)
At room temperature, magnesium (Mg) is a solid. Elements such as Mg that are solids at room temperature have very strong intermolecular forces that keep them in the solid state. To shift from a liquid or gas requires energy, and Mg doesn’t have the energy —at room temperature— to break those intermolecular forces.
Magnesium is a metal with a melting point of 1,202 Fahrenheit. So it will stay solid at the room temperature unless heated above the threshold if 1,202 Fahrenheit.