Pope Benedict XVI announced today that he will step down from the papacy at the end of the month, citing his age and poor heath. He is the first pope to resign since Gregory XII did roughly six centuries ago. Why did Gregory resign? Because there were three popes.
Pope Gregory XII's reign began in 1405 and ended 10 years later in 1415, at the end of a period known as the Western Schism. Although the Catholic Church considers him to be the one true pope for this period, he spent most of his papacy as one of three men making claims of legitimacy. In the end, he stepped down at the urging of the Council of Constance, which was more or less a church task force assembled by Gregory himself to find a way to bring an end to the schism.
So how'd they get to three popes in the first place? Essentially, a political split in the Catholic church during the 1370s resulted in two papal courts: one in Rome and one in Avignon, in modern day France. Because popes are supposed to call a council themselves to handle issues of succession (as Benedict XVI has done, in accordance with canon law), the double popes continued for decades. When Gregory XII was pope in Rome, his so-called "antipope" was Benedict XIII. And the Council of Pisa's 1409 attempt to end the schism only made things worse: they elected a third pope.
So in 1415 there were three popes: Gregory XII in Rome, antipope Benedict XIII in Avignon, and John XXIII, successor to the third papacy created in Pisa. Gregory XII and John XXIII agreed to resign in order to clear the playing field and allow for a new election of single pope. Benedict XIII, meanwhile, refused to resign, and was excommunicated in 1417. Gregory XII died two years after his resignation.
Although papal resignation was more common before the schism, it's never been taken lightly. As the Washington Post notes, the papacy is considered a paternity (in fact, the word for "Pope" has its roots in an ancient Greek term for "father"), and it's difficult to theologically handle a resignation. But perhaps even more importantly, as the paper notes: "the option of papal resignation could open the door for competing factions within the church to pressure popes to resign prematurely."
For more on papal resignation, take a look at this Vatican Radio segment on the subject, posted this morning.
Correction: An earlier version of this post misstated how long it's been since a pope resigned. It's been roughly six centuries, not more than six centuries.