In Days of Future Past, Magneto has his powers again, Charles Xavier is alive and Rogue has her powers when in X-Men: The Last Stand, Magneto got the 'cure', Xavier was killed by Jean and Rogue got cured. What happened?
Magneto was not fully "cured", he's too powerful for that; right before the end credits of The Last Stand start rolling, you can see him move a metallic chess piece with his mutant power.
Charles Xavier went for mind transfer in the post-credits scene, explaining how he could come back - see the thorough answer to What happened to Charles Xavier after X-Men 3?.
I don't remember Rogue in the version of DOFP I watched, I think the Rogue cut is a special cut. I'd have to watch it to confirm, but I'd wager a guess that Rogue is also very powerful and a single shot of "the cure" may not have been sufficient to remove all of her powers.
It is never addressed. In one of the last scenes it is hinted that the cure doesn't work (permanently) with Magneto seemingly being able to move a chess piece.
But the Marvel Fox universe is filled with Continuity errors, with the same characters having different origin stories.
Like Emma Frost being the sister of Logan's wife in X-Men Orirgins: Wolverine and being a member of the Hellfire Club decades earlier without having aged in between.
Or Caliban being a mutant in Apocalypse while being the same character with a completely different personality and backstory in Logan.
Same errors go for Cyclops, Storm and a lot of other minor characters.