Spoiler
Yeah, I read up on that online. it was a really cool build-up to the reveal, before we found out who it was - Juggernaut being thrown from Canada to the middle of America or something, various puppets under his directions, mindf**king other characters, then BAM! Instant asskicking.
As for how it happened, when *Extra, not-so-surprising spoilers about Wolverine*
When Magneto ripped out Wolverine's adamantium skeleton, Xavier was so pissed off about it that he tried to erase Magneto's mind. In doing so, however, he released his own inner rage and anger, which merged with Magneto's thoughts and hid in Xavier's mind, planning out events and generally being a badass. He had Xavier's psychic powers, and Magneto's magnetism abilities. Cool bad guy, silly defeat.
As for how it happened, when *Extra, not-so-surprising spoilers about Wolverine*
When Magneto ripped out Wolverine's adamantium skeleton, Xavier was so pissed off about it that he tried to erase Magneto's mind. In doing so, however, he released his own inner rage and anger, which merged with Magneto's thoughts and hid in Xavier's mind, planning out events and generally being a badass. He had Xavier's psychic powers, and Magneto's magnetism abilities. Cool bad guy, silly defeat.
One of the few times I've wanted to actually buy comics, really.