Now first things first: I'm not going to stand in judgement of Mr. Ratzinger – that's the court's job. Well, it would be, if he were in most countries in Europe, anyhow. One supposes he could be tried in absentia in a country that wished to cut all diplomatic ties with the Vatican, but that's simply not a political reality in any western democracy with a voting population of Catholics. SO. The only person who can un-Pope the Pope is the Pope: if it turns out that he did a bunch of terrible things (like playing that most entertaining of party games “cover-for-the-child-rapist”) he could choose to resign.
The reason this is being posted on a medieval blog is the following: the last time it was done, the last time that someone holding the papal office resigned, was to end the Great (Western) Schism, which a friend of mine once described as an Abbot and Costello routine.
See, once, there was a Pope. Just the one Pope, like you'd expect.
Then some folks went and elected a Pope not everyone liked, so those same people went off and elected a second Pope. Sort of like they were saying “right, sorry about that, here's a better option.” Except some people still liked their first choice.
So then there were two Popes.
And so they each had Popes succeeding them for a while, each calling the other a faker until someone got fed up with the whole mess and decided “You know what? To Hell with these Popes! We'll get our own!” (Direct quote. True story.). Except the first two failed to recognize their authority.
So then there were three Popes.
In the end, one of the Popes resigned, the second excommunicated the third and then resigned himself. For a while the excommunicated one refused to accept this, but eventually one of his successors resigned too, and the whole mess was quietly ignored for fears of people thinking they were all very silly people.
The first time a Pope resigned was in 1294. Celestine V, previously a hermit known as Pietro di Morrone, was elected Pope against his wishes after the death of Pope Nicholas IV. After a little over five years in an office he had no desire to keep, he issued a Papal decree enshrining the right of any Pope to quit, of which he then took full advantage. In his letter of resignation, he cited “the desire for humility, for a purer life, for a stainless conscience, the deficiencies of his own physical strength, his ignorance, the perverseness of the people, [and] his longing for the tranquility of his former life [as a hermit]” as his reasons (at least, that's what Wikipedia tells me).
After that, the ball was set rolling, allowing the three Popes who resigned to end the Western Schism (“Anti-Pope” John XXIII not to be confused with (non-Anti) Pope John XXIII, Gregory XXII, and the successor to the successor to the excommunicated Benedict XIII, “Anti-Pope” Clement VIII) to do so.
This is what a pain it is to get rid of a Pope.
So short of the other bishops breaking away, naming another Pope (an “Anti-Pope”, if you will), and having him excommunicate the first and then resign, there really isn't much of a way to hold a Pope to any standard of justice that isn't self-imposed.
Just in case the allegations prove true.
Now you know.
postscript confession: I am not a scholar of Vatican law, so this could all be horribly wrong. Take it with a grain of salt ;)