A Devil's advocate (in Latin, Advocatus diaboli) is a person who takes a position for the sake of argument, rather than out of conviction. Often the purpose is to spur discussion on a topic, or to ensure that potential pitfalls are fully discussed, before a decision is made.
Originally, devil's advocates were appointed by the Roman Catholic Church to argue against the canonization of individuals. The post was abolished by Pope John Paul II, allowing him to create and beatify an unprecedented number of saints during his pontiffship.
A fictional example of a devil's advocate is Panurge in Francois Rabelais' Gargantua and Pantagruel, who argues (among other things) that it is good for him to remain in debt, it being better to give than to receive, allowing his creditors to gain merit thereby; moreover, his creditors pray for his continued well-being; moreover, that the very fabric of the Universe is held together by a cement of debt, etc.