the miracle of feeding the 5000 had just finished and Jesus wanted time alone so he told his disciples to get into a boat and go to the other side of sea Galilee.
jesus wanted some time alone to pray during the journey a dangous storm overtakes the boat then the disciple start to wonder were god was
Jesus comes walking to them on the water and the disciples become scared thinking Jesus is a ghost. Jesus calls to them saying "Take courage! It is I. Do not be afraid."
Peter then questions Jesus saying if it really is Jesus, to call Peter to come walk on the water to him. Jesus invites Peter to come walk on the water with him. Peter climbs out of the boat and begins to walk on the water to Jesus. As soon as Peter gets scared of the wind and waves and takes his eyes off Jesus he beings to sink.
Jesus reaches his hand down and grabs Peter. They climb back into the boat and the storm stops. The disciples immediately begin to worship Jesus and recognize that he truly is the Son of God.