Exodus 17:6 NKJV
Behold, I will stand before you there on the rock in Horeb; and you shall strike the rock, and water will come out of it, that the people may drink.” And Moses did so in the sight of the elders of Israel.
When the Israelites were in desperate need of water, God supplied it for them miraculously. He had Moses strike a rock. It was through this rock that the physical need of the people was met.
Spiritual parallel: The rock represented Christ who would be struck (crucified) for us. Just as the physical rock, a representation of Christ provided natural water, the living Christ provided spiritual water. He brought us the water of the Word and the water of the Spirit. He was the Word made flesh. He is the anointing that lives in us by way of the infilling of the Holy Spirit. Speaking of Jesus, John said the following:
John 1:1 NKJV: In the beginning was the Word, and the Word was with God, and the Word was God.
The Father confirmed that Jesus was the One we needed to listen to.
Matthew 17:5 NKJV: While he was still speaking, behold, a bright cloud overshadowed them; and suddenly a voice came out of the cloud, saying, “This is My beloved Son, in whom I am well pleased. Hear Him!”
While speaking to a Samaritan woman, Jesus professed that He was the source of living (spiritual) water. (John 4:13-14)
Jesus described Himself also as the One who would give believers the Holy Spirit.
John 7:37-39 NKJV: On the last day, that great day of the feast, Jesus stood and cried out, saying, “If anyone thirsts, let him come to Me and drink. He who believes in Me, as the Scripture has said, out of his heart will flow rivers of living water.” But this He spoke concerning the Spirit, whom those believing in Him would receive; for the Holy Spirit was not yet given, because Jesus was not yet glorified.
As John wrote to believers to help them avoid deception, he pointed out that we have received an anointing from Jesus to teach us truthfully about everything. (1 John 2:27)