The nature of this ministry was described and foretold in the Old Testament. We learn that Moses was the great shepherd of the nation of Israel (Is 63:11). When Moses died, he passed on this ministry to Joshua, his successor, through the laying on of hands: "May the Lord, the God of the spirits of all mankind, set over the community a man who shall act as their leader in all things, to guide them in all their actions; that the Lord's community may not be like sheep without a shepherd.' And the Lord said to Moses, 'Take Joshua, son of Nun, a man of spirit, and lay your hands upon him." (Num 27:15-18). By this act, Joshua received Moses' own authority and dignity. This authority passed down even into the time of Christ: "The scribes and Pharisees sit in the seat of Moses. Therefore, do and observe all things whatsoever they tell you, but do not follow their example. For they preach but they do not practice." (Matt 23:2-3). The chair of Moses represents the seat of his authority, which was the guiding authority until the new Israel, when it was given to Peter and the Apostles. It is significant to realize that from Jesus' own mouth comes the command to submit to the appointed religious authority regardless of their personal sanctity. Their own hypocrisy as leaders does not negate the duty of obedience owed to them.
God promised he would give new and better shepherds to His flock: "I will appoint over you shepherds after my own heart, who will shepherd you wisely and prudently." (Jer 3:15). We find this prophecy fulfilled in the New Testament, when Jesus appoints the Apostles and their successors as the shepherds of the expanded People of God: "From Miletus had the presbyters of the church at Ephesus summoned. When they came to him he addressed them,…'Keep watch over yourselves and over the whole flock of which the Holy Spirit has appointed you overseers, in which you shepherd the Church of God that he acquired with His own blood." (Acts 20:17, 28). Christ Himself is identified as a Shepherd and a Bishop: "For you were as sheep going astray, but now are returned to the Shepherd and Bishop of your souls." (1 Pt 2:25). We see clearly in Scripture that the Bishop exercises the role of shepherd over his particular flock.
But what of Peter? Christ gave Bishops as shepherds for His churches, but what of the Church as a whole? Jesus promised, "There will be one flock, one shepherd." (Jn 10:16). Who will exercise the ministry of shepherd over the whole flock in Jesus' absence? The answer to that we find at then end of John's Gospel, right before Jesus' ascension: "When they had finished breakfast, Jesus said to Simon Peter, 'Simon, son of John, do you love me more than these?' He said to him, 'Yes, Lord, you know that I love you.' He said to him, 'Feed my lambs.' He then said to him a second time, 'Simon, son of John, do you love me?' He said to him, 'Yes, Lord, you know that I love you.' He said to him, 'Tend my sheep.' He said to him a third time, 'Simon, son of John, do you love me?' Peter was distressed that he had said to him a third time, 'Do you love me?' and he said to him, 'Lord, you know everything; you know that I love you.' Jesus said to him, "Feed my sheep'." (Jn 21:15-17). There are a number of key things to take from this. First, Jesus is giving to Peter His own identity as the one who feeds the lambs, tends the sheep, i.e. the Shepherd of the Flock. Second, it is specific to Peter: Jesus addressed these word to Peter alone, calling him by his proper name and family name. Third, it is something more significant than the ministry of the other Apostles - "do you love me more than these?" He tells Peter this in the presence of the other Apostles, specifically singling Peter out and telling him that he must give more than the others. Jesus is here very explicitly commissioning Peter to be the Chief Shepherd of the people of God after His ascension.
Just as Moses' authority did not die with him, but was passed down through the ages, neither does Peter's authority or ministry pass away after his death. Christ would not leave His people without a shepherd to guide them. Peter even alludes to his ministry being ongoing, ever present in the Church: "I shall also make every effort to enable you always to remember these things after my death." (2 Pt 1:15). We can be assured, then, that the successor of Peter, who is the Rock, the Key-holder, and the Shepherd, will always be with the One Flock on earth to guide them; the Holy Spirit will preserve him from teaching error by the promised Spirit of Truth (Jn 16:12-13) so that the people of God will never be like sheep without a shepherd. As St Cyprian summed it up:
"On him he builds the Church, and to him he gives the command to feed the sheep (John 21:17), and although he assigns a like power to all the apostles, yet he founded a single chair (cathedra), and he established by his own authority a source and an intrinsic reason for that unity. Indeed, the others were that also which Peter was (i.e., apostles), but a primacy is given to Peter, whereby it is made clear that there is but one Church and one chair. . . . If someone does not hold fast to this unity of Peter, can he imagine that he still holds the faith? If he should desert the chair of Peter upon whom the Church was built, can he still be confident that he is in the Church?" - On The Unity of The Catholic Church, 251 AD