Asteroid M is a asteroid high above the Earth, but not quite in space, as everyone can still breathe. It was created by Magneto as a sanctuary for mutants against humans. In Magneto's mind, humans would hate them for who and what they were, so he wanted to be prepared for a war.
The Asteroid was destroyed by the combined force of Cyclops and Havok's energy beams, with both having their powers boosted by the Gem of Cyttorak. Saving everyone from it as it fell towards the ground.