Under lock and key: How the conclave works
As the world awaits news from Rome on the beginning of the next conclave--which at this writing has still not been established--here's a little primer on how the conclave works.
First, the law: The current Code of Canon Law (issued in 1983) states only that "The cardinals of the Holy Roman Church constitute a special college which provides for the election of the Roman Pontiff according to the norm of special law" (c. 349). That "special law" was issued by Pope John Paul II in 1996 in Universi Dominici Gregis,  which also explains how the church is governed with the see of Rome is vacant. For example, the college of cardinals has very limited powers, and can't do things reserved to pope (an infallible declaration, for example). Pope Benedict XVI made two revisions to this law: He reinstated the two-thirds requirement for the election of a pope, and he shortened the "waiting period" before the conclave can begin.
According to Universi Dominici Gregis, to vote in the conclave, one needs to be a cardinal whose name has been published (you don't have to have been invested yet, just named) and under 80 when the see of Rome becomes vacant (thus Cardinal Walter Kasper, who turned 80 on March 5, is eligible to vote because the pope resigned on February 28). Participation of an eligible member can't be impeded, since it comes with office: Thus Keith O'Brien of Scotland, regardless of his resignation, still has the right to participate in the conclave (though he will not), and no one can prevent Roger Mahony of Los Angeles from participating either.
Once the conclave is underway, the cardinals are sworn to secrecy; indeed, they are not allowed to communicate with anyone at all (with the exception of other cardinal electors) without special permission from the "particular congregation" (four cardinals who run the election)--so any tweeting cardinals will have to disconnect. They stay in "Martha House" (a Vatican guesthouse built for this purpose) until the new pope is elected. The secrecy is meant to ensure the freedom of the cardinals from any undue influence and breaking it brings automatic excommunication. (The process is full of oaths sworn on the Book of Gospels.)
Once the balloting begins, except on the first day, when only one ballot might occur, there are generally two ballots in the morning session and two in the afternoon until the required two-thirds majority is reached. Votes are made by secret paper ballot--no electronic voting machines yet! Once the two-thirds majority is reached, the elected person is asked for his consent. Once he gives it: Habemus papam.