Naturally, there is a real desire not only to prevent cheating and tampering, but also to prevent people from knowing who has voted for whom. Election can occur via acclamation (where everyone spontaneously agrees to the same man), compromise (where the choice is entrusted to a small group) or scrutiny, where everyone votes via secret ballot. The most common form of election is via scrutiny and it is very rare that the other forms take place.
When the cardinals vote together on who will be the next pope, everyone has a paper ballot labeled Eligo in Summum Pontificem, which means I elect as Supreme Pontiff. Here they write the name of their first choice, but preferably in disguised handwriting.
Each cardinal then goes to an altar, kneels for a silent prayer, and then states the oath: I call to witness Christ the Lord who will be my judge that my vote is given to the one whom before God I consider should be elected. The ballot is held up high so that everyone can visually confirm that the cardinal has voted and the ballot is placed in a paten and then is tipped into a chalice that stands on the altar.
If any of the cardinals are too sick to be present, their votes are collected by three other cardinals (chosen by lots) who return from the temporary residence with the votes and place them into the chalice as well. After all the votes are there, the chalice is shaken and one of three cardinals chosen as scrutineers removes the ballots one by one, in view of everyone present, and places them in another container. This process ensures that the same number of ballots is removed as were put in if the number is wrong, the entire vote is deemed invalid.
After everyone has finished this process, the Cardinal Camerlengo counts them in full view of the cardinal electors with the help of the three scrutineers. The presence of these three assistants is to ensure that there is no cheating and no errors: each assistant reads the name on a ballot, then reads it aloud, writes the name on a tally sheet, and passes the ballot to the next assistant for the process to continue.
Once the third assistant has gone through this with a ballot, he runs a threaded needle through the center, eventually joining all of the ballots together. This ensures that all ballots are verified three times, but only counted once. Later all ballots, tally sheets, and notes will be burned.
When, after a series of votes, no new pope is elected, the papers are mixed with straw when burned in order to give off a black smoke that lets people know that an unsuccessful vote has occurred. However, if a pope is elected, then papers are added to the fire that give off white smoke, telling everyone outside that there is a new pontiff for the Roman Catholic Church.
The first vote is held on the afternoon of the first day of the conclave, thus potentially allowing for a very quick election, although in practice that isnt very likely. After this, there are two votes every morning and one vote every afternoon. After a total of nine votes, the cardinals are allowed to pause for a day for prayer and discussion. After this, a similar pause can be called after every seven votes.
What does it take for someone to be elected pope? There is no need for a unanimous decision; instead, a person only needs a two-thirds majority in order to be successful. This can be difficult to achieve in the past, it has not been unusual for one candidate to get a very solid majority of votes, but not quite the two-thirds for a successful election. A common result is that a compromise candidate is chosen, sometimes one so old that he wont last long and wont do too much; in effect, this is a means to create an adjournment of the conclave for a couple of years
This has been unsatisfactory to many who have argued that it goes against the principle of electing someone to fill the role of Peter and lead Roman Catholicism. One of the changes made by Pope John Paul II was to give them a second option: after 30 unsuccessful votes, the cardinals may vote by an absolute majority (half + 1) to allow someone to be elected pope by absolute majority instead of a two-thirds majority. They dont have to choose to do this: they can continue requiring a two-thirds majority and perhaps vote to change later on.
One of the reasons why a majority of votes has at times failed to become a two-thirds majority is that the favored candidate has been too conservative to appeal to a significant minority of liberal or at least moderate cardinals. Thus, one of the consequence of the change in rules created by John Paul II may be that conservative and traditionalist cardinals may no longer be forced to compromise and elected a less conservative pope in the future.

