As Genesis alluded to, in the early Church the Bishop of Rome was selected by election by the clergy of Rome.
As the Chuch grew, this method proved to be unworkable, so selected clergy were appointed to do the election.
We see ruminates of that in two forms. First, each Cardinal is appointed as pastor of a parish Church in Rome. So all the Cardinals are clergy of Rome. Thus Cardinals are subject to the Pope alone, as he really is their bishop.
We see that the College of Cardinals is divided into Cardinal Bishops, Cardinal Priests and Cardinal Deacons, much as the clergy of Rome is.
In the current environment, Cardinals are almost always Bishops ( the most recent exception being Cardinal Avery Dulles). Cardinal Bishops are those who head the College, emphasizing the leadership of the bishop. Cardinal Priests are those Cardinals who are Ordinaries of their own dioceses, Cardinal Priest being the role of pastor.
Finally, Curial Cardinals are generally Cardinal Deacons, emphasizing the role of servant.
But all have their roots in the elections by the early clergy of Rome.