CCC 861 “In order that the mission entrusted to them might be continued after their death, [the apostles] consigned, by will and testament, as it were, to their immediate collaborators the duty of completing and consolidating the work they had begun, urging them to tend to the whole flock, in which the Holy Spirit had appointed them to shepherd the Church of God. They accordingly designated such men and then made the ruling that likewise on their death other proven men should take over their ministry.”1

CCC 862 “Just as the office which the Lord confided to Peter alone, as first of the apostles, destined to be transmitted to his successors, is a permanent one, so also endures the office, which the apostles received, of shepherding the Church, a charge destined to be exercised without interruption by the sacred order of bishops.”2 Hence the Church teaches that “the bishops have by divine institution taken the place of the apostles as pastors of the Church, in such wise that whoever listens to them is listening to Christ and whoever despises them despises Christ and him who sent Christ.”2

1 LG 20; cf. Acts 20:28; St. Clement of Rome, Ad Cor. 42,44:PG 1,291-300.
2 LG 20 § 2.
3 LG 20 § 2.