A revolving door moves in a circle and so does this character in terms of morality. A villain decides to give heroism a try (for whatever reason) and switches sides but then goes back to being a villain and back again. This phenomenon works the other way, as well. A hero loses perspective and becomes a Well-Intentioned Extremist, and then comes back from the edge again. He's done it before — why not do it again?
The long-term result is the same either way — the character in question will switch sides often enough that, in the long run, he doesn't have a side. This is what makes a Heel Face Revolving Door (or Face Heel Revolving Door, depending on which side the character starts out on).
If it happens to a popular or well-developed character, the fans will stick with them; but this will, by necessity, drag the morality of the series to one of the gray-scales. If heroes and villains are switching sides so casually and frequently then it's impossible for true Black-and-White Morality to exist.
This is common in Comic Books, media using the Fleeting Demographic Rule, and collaborative media written by fans Running the Asylum. It's easier with characters who have what is initially a Never Live It Down moment or a Remember When You Blew Up a Sun? in their past. Beware; if an Ensemble Dark Horse ex-villain has had a long and well-developed redemption arc, turning them evil again may anger a significant portion of the fanbase, especially if it's done suddenly or for little reason.
Enemy Mine can facilitate this. It's often understood that switching sides through Enemy Mine won't create a permanent change of allegiance but if a sufficiently high percentage of a character's appearances are Enemy Mine, this is one of the possible implications.
Someone who has been through the revolving door too many times will turn into the Wild Card. If mostly on the side of good, despite having decidedly nonheroic intentions, may be a Nominal Hero.
Compare Chronic Backstabbing Disorder (which is more about switching between grey groups than white-to-black or visa versa), Wild Card (where the character isn't strongly on anybody's side ever), Unscrupulous Hero (a character who is unambiguously on the heroic side), the Double Reverse Quadruple Agent (he never changes sides, but no one is sure what side he's really on), and Flowers for Algernon Syndrome (when a character changes only to revert back). See Fake Defector for when a villain fakes a Heel–Face Turn, only to return to being evil after his goal is achieved. See Moral Pragmatist for a character who switches sides to whoever is best suited to help their plans. Contrast Allegiance Affirmation (where a character confirms where their loyalties lie).