“I am the good shepherd” is one of eight “I am” statements by Jesus. He explains the relationship between sheep and their shepherd to his disciples. Later Jesus tells Peter to shepherd his sheep, and so we also shepherd on his behalf until he comes again.
John 10:1-10 (ESV)
I Am the Good Shepherd
 “Truly, truly, I say to you, he who does not enter the sheepfold by the door but climbs in by another way, that man is a thief and a robber.  But he who enters by the door is the shepherd of the sheep.  To him the gatekeeper opens. The sheep hear his voice, and he calls his own sheep by name and leads them out.  When he has brought out all his own, he goes before them, and the sheep follow him, for they know his voice.  A stranger they will not follow, but they will flee from him, for they do not know the voice of strangers.”  This figure of speech Jesus used with them, but they did not understand what he was saying to them.
 So Jesus again said to them, “Truly, truly, I say to you, I am the door of the sheep.  All who came before me are thieves and robbers, but the sheep did not listen to them.  I am the door. If anyone enters by me, he will be saved and will go in and out and find pasture.  The thief comes only to steal and kill and destroy. I came that they may have life and have it abundantly.