Since Medieval times when after a pope passes away, a very specific process is undertaken in order to elect the next one. This is what is called a conclave. The word comes from the Latin word conclavium, meaning “locked in a room.” It is called this because the group of cardinals, called a college, actually lock themselves in the Sistine Chapel while the proceedings take place. While they are not solely kept in the same place, they are cut off from all outside connection for the duration of the conclave. This college is made up of only the cardinals who are eighty years or younger who all gather in Vatican City for the previous pope’s funeral services before beginning their duty.
Once the conclave begins, it does not end until there is a new Pope. The college of cardinals decide by secret ballot, with each giving one vote for who among them they believe should be the next pope. Once a vote has finished, the ballots are read aloud and counted three randomly selected cardinals. If a cardinal receives a two-thirds majority of the votes, they are to become pope. However, if a consensus is not reached, the cardinals must take another vote either right away or after a recess. This process may continue for multiple days while the outside world waits patiently for an outcome. The public is somewhat notified of the conclusion of each vote via the smoke of the chapel’s chimney. After each unsuccessful vote, the ballots are burned with a chemical that releases black smoke, indicating to those outside that they must wait longer.
Eventually, when a pope is finally selected, a different chemical is used to produce white smoke and the people standing in St. Peter’s Square now anticipate the first public appearance of the next pope. The newly selected pope is changed into white papal garments and brought out to a front balcony of St. Peter’s Basilica. The senior cardinal dean announces “Habemus Papam” and introduces the new pope by his chosen papal name. Finally, he emerges from behind the curtain, and everyone sees the newest leader of the Church.
https://www.shutterstock.com/image-illustration/pope-cardinals-choir-dress-conclave-260nw-516417154.jpg