It is difficult to answer such a question in a comprehensive and pragmatic way. However, one can understand, in what way the way each successive pope is elected.

The first head of the Catholic Church was St. Peter, established by himself Jesus. He said to Peter thus: "You are Peter, that is, a rock, and on this rock I will build my Churchand the gates of hell shall not prevail against it." In the beginning, the Church was not an elaborate institution as it is today, with millions of believers around the world, but was a group of dioceses led by Jesus' disciples and their successors. Over time, as the Church grew with more believers, more spiritual leaders had to be elected to unite all groups and ensure the unity of the faith.

In modern times, the pope is chosen from among the cardinals during a conclave. After secret votes by the clergy, the votes are counted and then the result of the election is announced to the world. If black smoke rises from the chimney, the pope has not been elected. If it is white, it means that soon we will hear the famous phrase: "habemus papam". This is what happened on 16 October 1978, when the new earthly head of the Church, John Paul II, was elected. So why did Karol Wojtyla become Pope? Because this was decided by the College of Cardinals, with the help of the Holy Spirit, during the Conclave of 1978.