Playing the Devil’s Advocate is a tool which can be used to promote open-minded skepticism. It involves strong advocacy of negations to the proposition in question. Like a good debater, the advocate employs reason to examine a position or argument in order to test its validity. Specifically, a position is tested by bringing up facts or points that are unfavourable to the position or argument.
The Devil’s Advocate's role is to be skeptical and to find flaws in the proponent’s case despite the fact that the person playing Devil's advocate often believes the proposition or case that he or she is arguing against. Whether the Devil's Advocate ultimately believes the points he or she is making is irrelevant. This is a process to go through in order to ensure an argument is as flawless as possible (through the proponent's systematic rebuttal of the points made by the Devil's Advocate).
The expression, playing the Devil's Advocate, is also used when someone is arguing "just for the sake of it".
Note the etymology of the Devil’s Advocate is Catholic. It was a real position taken up in order to scrutinise people intended for beatification and canonisation.
Note: my original post has since be edited (and improved) by Jef.