Since 1059, the election of the Pope has been reserved to the cardinals alone and this is their principal function - this is the first thing said about them in the Church's Code of Canon Law.
The cardinals were originally advisors to the pope. By the 12th century, the cardinals consisted of seven bishops of dioceses round Rome, 28 priests from Roman churches and 20 deacons.
Cardinals are still ranked as cardinal bishops, cardinal priests and cardinal deacons; even though (since 1962) they are all now required to be bishops before they are made cardinal.
Cardinals are major administrators of Church affairs, serving in one or more departments of the Roman Curia. Cardinals in charge of agencies of the Roman Curia and Vatican City are asked to submit their resignation from office to the Pope on reaching the age of 75. A cardinal's title, while symbolic of high honour, does not signify any extension of the powers of holy orders.
Cardinals are not an “order” in the Church like bishops or priests and so they are not ordained as cardinals, simply appointed by the Pope, and make up the College of Cardinals. The creation of new cardinals ensures that there is a sufficient number eligible to vote (i.e. under the age of 80) up to a maximum of 120.
The 120, from all parts of the world and from very different cultures, are considered sufficiently expressive of the universality of the Church to make up the maximum number of electors and represent the Catholic community worldwide.
The proviso that those Cardinals who celebrate their eightieth birthday before the day when the Apostolic See becomes vacant do not take part in the election is explained in Universi Dominici Gregis, which states that the reason ‘is the desire not to add to the weight of such venerable age the further burden of responsibility for choosing the one who will have to lead Christ's flock in ways adapted to the needs of the times.’