In John 21, Jesus appears to his disciples for the third time after his resurrection. The chapter begins with seven of the disciples, including Peter, fishing on the Sea of Galilee. They catch nothing all night, but Jesus appears on the shore in the morning and tells them to cast their net on the right side of the boat. When they do, they catch a large number of fish. Peter then jumps into the water and swims to shore to meet Jesus.
Jesus and the disciples then have breakfast on the shore, and Jesus asks Peter three times if he loves him, each time telling him to feed his sheep. This is interpreted as a way for Jesus to forgive Peter for denying him three times before his crucifixion.
Jesus then tells Peter that he will suffer and die for his faith, and Peter asks about the future of John, another disciple. Jesus says that what happens to John is not Peter's concern, and instructs him to follow him. The Gospel of John concludes by saying that Jesus did many other things that were not recorded in the book, but that everything recorded was done so that the reader may believe in him and have life in his name.