Magnesium has no hard and fast rule when it comes to extent of reactivity. With some compounds, Magnesium has no reaction, while it has a very strong reaction when coupled with others.
Magnesium is a metal, but it forms a solid layer of oxidation on the outside. This prevents further reaction with the oxygen in the air. It also has a very slow reaction to cold water because it quickly forms magnesium hydroxide, which is insoluble in water. This means it barely reacts with cold water, but when it comes in contact with steam it will produce magnesium oxide and hydrogen gas via thermal decomposition of the metal oxide.
Magnesium will react strongly with chlorine and bromine and will dissolve in acids to form solutions