When Jesus came to the area of Caesarea Philippi, he asked his disciples, “Who do people say that the Son of Man is?” They answered, “Some say John the Baptist, others Elijah, and others Jeremiah or one of the prophets.” He said to them, “But who do you say that I am?” Simon Peter answered, “You are the Christ, the Son of the living God.” And Jesus answered him, “You are blessed, Simon son of Jonah, because flesh and blood did not reveal this to you, but my Father in heaven! And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overpower it.”
Despite what many Christians think, neither Peter nor his confession was the “rock” that Jesus referenced since He changed the term from the Greek “petros” to “petra” indicating a difference. After all, Jesus had just changed his name from “Simon, son of Jonah” to “Peter.” Therefore, it is best to think of the feminine noun (Petra) as indicating distinction from the disciple. Also, contra to those who want to refer to Aramaic wordplay spoken between Jesus and Peter, the text was given by the Holy Spirit in Greek.
Peter himself, later writing his epistle (I Pet. 2.4-8), possibly links the Matthew passage and says Christ is the “Rock” (Cornerstone or maybe capstone) and us as “living stones” built to line up with this all-important “Cornerstone” as was the practice of running a line off the template Stone. Additionally, Jesus may have been primarily a stonemason along with Joseph, His adopted father, as the term “carpenter” (Mk. 6.3) referred to both artisans. The houses in first century Israel were mostly stone with wood used mainly for windows and doors along with their frames which the same tradesmen most likely would fit when they got to that point in the wall. So now, the former stonemason, Jesus, is going to build a spiritual temple for God through the Spirit.
Another antecedent possibility to “petra” could be the revelation of the Father that Peter received to know who Jesus truly was. This is my view and presents The Loving Father electing Peter as a foundation stone (see Eph. 2.20: “being built on the foundation of the apostles and prophets, with Christ Jesus himself as the cornerstone”). Future disciples would be subsequent stones, without the need for the office of vicar, since the apostolic foundation is already laid. Therefore, the Triune Godhead is at work: The Father electing, The Son building, and The Spirit indwelling this spiritual temple.
In either case the picture presented of the church is not a human institutional hierarchy built on Peter, but an organism (“one body” Eph.4.4, “living” I Pet. 2.5) that is known and built exclusively by Christ instead of a human church or denomination, which is an organization. Jesus made it clear exactly how His church would function in Mark 10.42-44: “You know that those who are recognized as rulers of the Gentiles lord it over them, and those in high positions use their authority over them. But it is not this way among you. Instead whoever wants to be great among you must be your servant, and whoever wants to be first among you must be the slave of all.”
(all Scripture: NET Bible)