A brief history of Peter follows: Brother of Andrew who was a follower of John the Baptist, actual name was Simon, from Bethsaida, and he was married. He was a fisherman and one of the first to be called to follow Jesus. He's not well-educated, in fact it is supposed that he neither read not wrote. So here we have a hard-working, married man who lives by the sweat of his brow. All of a sudden he's catapulted into the arena of the spiritual and divine. What's to become of him?
Jesus changed Simon's name to Peter. This was the result of Peter being the first to recognize that Jesus was the Son of the living God. (Matthew 16:16). Peter is there at the Transfiguration. (Matthew 17) And he is the one who steps out onto the water and cries for Jesus to save him when he begins to sink. (Matthew 14) Even at this event Jesus says to him, "O thou of little faith, wherefore didst thou doubt?" (verse 31)
When the apostles were gathered with Jesus at the Last Supper, Jesus told Peter that He prayed for him because Satan had desired to "sift him like wheat". (Luke 22:32) He went on to say "When thou are converted, strengthen thy brethren." Peter responded by saying that he was ready to die with Jesus. This is when Jesus warns him that he will deny him three times on that very day.
Peter is there when Judas leads a band of men from the chief priests to arrest Jesus. In the heat of the moment Peter lops off the ear of one of the high priest's servants. Jesus restores the man's ear. (Luke 22:51) It is at this point that Peter follows afar off. Peter has been shaken to his core. Here is the man, Jesus, he has followed for three years. He's being led away. The devil has caught Peter at his weakest moment in life.
The story is related in John 18:15-27. Jesus is led into the palace of the high priest. One disciple goes in with him, the other one falls back. Peter won't go in. Not even when the other disciple, probably John, comes to fetch him. Still he won't go in. He's there but he hanging outside with the officers keeping himself warm by the fire. Twice by now he's denied that he's a follower. The third time he was asked if he was here with Jesus was when the servant who lost his ear identified him. His denial came readily and, just then, the cock crowed.
The chicken came home to roost. At that moment Jesus turned and looked at Peter who was standing outside. (Luke 22:61) Peter came to himself and the next verse tells us that he went out and wept bitterly. Peter's story is one of human nature. Were it not for the presence of Jesus in this world and the grace he bestows so generously, all of us would be doomed to a devil's hell.