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?

The cure isn't permanent, and Xavier transferred his mind into another body. A lot of this isn't answered in the film directly because Brian singer, the director of x1, x2, and days of Future past, wanted to essentially forget and erase x3 from the timeline because he as well as movie goers didn't like the film and it was perceived badly. This is also why he completely rewrites wolverines origin story because he also disliked the X-Men origins movie about wolverine, and even included his own scenes in the X-Men apocalypse film.
– Ace CabbieFeb 25 at 20:39

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.