Hundreds of millions of years ago, during the time of dinosaurs, Shuma-Gorath the ruler of the Old Ones, imprisoned the rebellious Quoggoth in a tomb on Earth. The location where his sepulcher was located would eventually become part of the Bermuda Triangle, an island which came to be known known as Island M.
Prior to mankind developing language, the island was a stronghold of the Ancients, an evil race who ruled the Earth. They were seemingly monstrous cephalopod humanoids with octopus-like heads, who committed "unspeakable atrocities" at their citadel. Eventually they were defeated and bound via the use of black magic and human sacrifice. Millennia afterwards, it's stones radiated a malevolence that neither time or effort could ever purge. The citadel was protected by guardians, statues which were made of crystalline circuitry matrix.
In the mid-20th century, the uncharted island which had sunk to the bottom of the ocean was raised to the surface by Magneto. Who turned it into a base for his Brotherhood of Evil Mutants. The X-Men were temporarily imprisoned on the island but escaped with the help of the Avengers, defeating Magneto who they thought killed by the explosion on the base.
Years later, Magneto would reestablish his base on the island. Where he built a machine that amplified his power and permitted him to manipulate the electromagnetic field of the Earth, including causing an earthquake in a Russian city in Siberia, complete with lava flows erupting in the middle of the city. The device was destroyed by the X-Men and during the fighting the teenage Shadowcat was almost killed, forcing Magneto to reflect on his past actions. In the aftermath the temporarily stranded X-Men encountered Quoggoth, the imprisoned Old One. Who attempted to manipulate and force Cyclops and Shadowcat to free him, but failed as they were rescued by Wolverine.
Decades later, the temporarily reformed Magneto, the X-Men, and the New Mutants used the island as a R&R location. As its electronic systems and eldritch nature masked the island from the rest of the world. Being on that evil island made the X-Men uneasy. The Chief Examiner, an alien, activated the statues and unleashed the eldritch horrors on the mutants. Whose touch turned their victims into statues, living but inanimate. They were saved by the actions of Magneto and Rogue.