Follow the cross references in your Bibles and see just how Jesus fulfills the story.
Exodus 17:5-6
And the Lord said to Moses, “Pass on before the people, taking with you some of the elders of Israel, and take in your hand the staff with which you struck the Nile, and go. Behold, I will stand before you there on the rock at Horeb, and you shall strike the rock, and water shall come out of it, and the people will drink.” And Moses did so, in the sight of the elders of Israel.
1 Corinthians 10:1-4
For I do not want you to be unaware, brothers, that our fathers were all under the cloud, and all passed through the sea, and all were baptized into Moses in the cloud and in the sea, and all ate the same spiritual food, and all drank the same spiritual drink. For they drank from the spiritual Rock that followed them, and the Rock was Christ.
John 4:7-15
A woman from Samaria came to draw water. Jesus said to her, “Give me a drink.” (For his disciples had gone away into the city to buy food.) The Samaritan woman said to him, “How is it that you, a Jew, ask for a drink from me, a woman of Samaria?” ( For Jews have no dealings with Samaritans.) Jesus answered her, “If you knew the gift of God, and who it is that is saying to you, ‘Give me a drink,’ you would have asked him, and he would have given you living water.” The woman said to him, “Sir, you have nothing to draw water with, and the well is deep. Where do you get that living water?Are you greater than our father Jacob? He gave us the well and drank from it himself, as did his sons and his livestock.”Jesus said to her, “Everyone who drinks of this water will be thirsty again, but whoever drinks of the water that I will give him will never be thirsty again. The water that I will give him will become in him a spring of water welling up to eternal life.” The woman said to him, “Sir, give me this water, so that I will not be thirsty or have to come here to draw water.”