The full story
Scattered through time by the previous season's blast, the X-Men are actually part of a plan: Mother Askani sent them to stop Apocalypse's rise before it happens. One group is stuck in Ancient Egypt with the young En Sabah Nur, before he becomes Apocalypse; Cyclops and Jean Grey are stranded in the year 3960 with grown-up versions of their children. In the present, Bishop and Forge try to pull everyone home, while Cable, Psylocke, and Archangel form a new team, X-Force, to fight Apocalypse's Horsemen directly.
Magneto, helping the stranded X-Men escape ancient Egypt, sacrifices himself stopping a black hole Apocalypse creates — dying in front of a devastated Charles Xavier. Apocalypse resurrects Gambit as one of his own Horsemen; Gambit spends most of the season fighting the brainwashing before finally breaking free, only to be shot by Cable, who believes it's what has to happen.
In the finale, Nightcrawler offers his own life to the Celestial Eson so that Rogue can absorb celestial-level power and save both Gambit and the rest of the brainwashed Horsemen. Rogue uses that power to trap Apocalypse's consciousness in a crystal and hands it to Cable; the X-Men, X-Force, and X-Factor fight together to finish him off. Rogue survives the transfer, and Nightcrawler's sacrifice is what makes the ending anything but a tragedy.
In a post-credits scene, Mystique murders government official Valerie Cooper and takes her place, while the anti-mutant Graydon Creed is elected President of the United States.