B'resheet 28:18-19 So Ya'akov rose early in the morning, and took the stone that he had put under his head and set it up as a pillar, and poured oil on its top. And he called the name of that place Bethel; however, previously the name of the city had been Luz.
Bethel - means "house of G-d". It is about 6 miles north east of Jerusalem.
Why anoint a rock? What does this rock point to?
We must look to the whole counsel of G-d - the Bible. The rock was anointed because a head of a person who was in service for G-d was usually anointed and this rock represented the Messiah Yeshua. This rock pointed toward the promised seed (the Son of Man) coming through Yitz'chak and Ya'akov - our anointed Messiah who is our cornerstone.
Yesha'yahu (Isaiah) 28:15-16 For we have made falsehood our refuge and we have concealed ourselves with deception." Therefore thus says the L-rd G-D, "Behold, I am laying in Zion a stone, a tested stone, A costly cornerstone for the foundation, firmly placed. He who believes in it will not be disturbed.
Ephesians 2:17-3:1 And He came and preached peace to you who were far away, and peace to those who were near; for through Him we both have our access in one Spirit to the Father. So then you are no longer strangers and aliens, but you are fellow citizens with the saints, and are of G-D'S HOUSEHOLD, having been built upon the foundation of the apostles and prophets, Messiah Yeshua HIMSELF BEING THE CORNER STONE, in whom the whole building, being fitted together is growing into a holy temple in the Lord; in whom you also are being built together into a dwelling of G-d in the Spirit. NAS (see also Ps.118:22;Matt. 21:42)
G-d's house is built on faith/trust in Yeshua. The same kind of faith others have had- Kefa (Peter), the apostles, and the prophets.
Matt 16:15-20 He said to them, "But who do you say that I am?" And Shim'on Kefa (Simon Peter) answered and said, "You are the Messiah, the Son of the living G-d." And Yeshua answered and said to him, "Blessed are you, Shim'on Bar-Yochanan, because flesh and blood did not reveal this to you, but My Father who is in heaven. "And I also say to you that you are Kefa (Peter), and upon this rock I will build My church/synagogue; and the gates of Hades shall not overpower it. "I will give you the keys of the kingdom of heaven; and whatever you shall bind on earth shall be bound in heaven, and whatever you shall loose on earth shall be loosed in heaven." Then He warned the talmidim (disciples) that they should tell no one that He was the Messiah.
B'resheet 28:20 Then Ya'akov made a vow, saying, "If G-d will be with me and will keep me on this journey that I take, and will give me food to eat and garments to wear, and I return to my father's house in safety, then the L-RD will be my G-d. And this stone, which I have set up as a pillar, will be G-d's house; and of all that Thou dost give me I will surely give a tenth to Thee."
It seems Ya'akov has some spiritual transformation and continues to follow HaShem. This is a universal transformation that is necessary for all. We all at some point must come to the understanding we all need the Messiah and to trust in Him personally. He realizes he stands at a Holy place and that there will be an important House built for mankind. If only you believe this house of G-d brings with it the gift of eternal redemption, completion, and transformation of mankind.
Ya'akov then also decides to give back to HaShem a tenth of what he is given.