The cardinals are commanded to act in complete secrecy when a new pope is elected, and it is taken very seriously.
If any of them blab, not only are they threatened with losing their position but also with excommunication from the church.
Traditionally, the pope always had to be elected by a two-thirds majority, but Pope John Paul II has changed that, reportedly to make it easier to elect a doctrinal conservative. Now, after 30 successive but unsuccessful votes, the cardinals can decide to elect the pope by a simple majority.
In the past, the two-thirds rule made it likely that the hard-liners in the majority had to come up with a candidate who was also acceptable to the moderates and liberals.
Sometimes, when seriously deadlocked, they’d deliberately “punt” the decision forward by nominating an elderly cardinal in poor health with the idea that he’d likely serve a short and uneventful term and die within a few years.
This strategy sometimes backfires, however, as with Pope John XXIII, who was 77 when elected but who made major reforms to the church in the five years he served. Hey, once you’re pope, you can pretty much do what you want.
After each vote the ballots are counted by Vatican clerks, stitched together with a needle and thread, and then burned. If no one gets enough votes, the Vatican staff members add wet straw to the fire to make black smoke, to signal to the outside world that there is not yet a new pope.
If a new pope has been chosen, they burn the papers with dry straw to make white smoke.