Logan burned out his healing factor to survive that (he was fine in the end, though), Xavier retaliated by wiping Magneto’s mind but in doing so he created Onslaught, a sentient psionic entity created from the darker parts of their consciousness (Xavier and Magneto’s)