Matthew 16:18 esv
18 And I tell you, you are Peter, and on this rock[a] I will build my church, and the gates of hell shall not prevail against it.
Now let's expand the verse to get a better understanding of the context of Jesus' statement.
Matthew 16:13-20
Now when Jesus came into the district of Caesarea Philippi, he asked his disciples, "Who do people say that the Son of Man is?" 14 And they said, "Some say John the Baptist, others say Elijah, and others Jeremiah or one of the prophets." 15 He said to them, "But who do you say that I am?" 16 Simon Peter replied, "You are the Christ, the Son of the living God." 17 And Jesus answered him, "Blessed are you, Simon Bar-Jonah! For flesh and blood has not revealed this to you, but my Father who is in heaven. 18 And I tell you, you are Peter, and on this rock I will build my church, and the gates of hell[c] shall not prevail against it. 19 I will give you the keys of the kingdom of heaven, and whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed[d] in heaven." 20 Then he strictly charged the disciples to tell no one that he was the Christ.
So Jesus asked a question, which Peter correctly answered and Jesus complimented him and then said that he is "rock", as evidenced by the fact that God had revealed to him that Jesus is the son of God, and then said that he would build his church on "this" rock.
The question is, who is "this" referring to? The Catholic Church teaches that it is Peter. If this was the only mention of "rock" in the Bible it would be hard to dispute their conclusion. However, the words "rock", "foundation", or "cornerstone" are used interchangeably throughout the Bible and they always refer to God/Jesus, except in this ONE instance, according to the Catholic Church.