The boy Samuel served the Lord in Eli's presence. In those days the word of the Lord was rare and prophetic visions were not widespread.
References for 1 Samuel 3:1
One day Eli, whose eyesight was failing, was lying in his room.
References for 1 Samuel 3:2
Before the lamp of God had gone out, Samuel was lying down in the tabernacle of the Lord where the ark of God was located.
References for 1 Samuel 3:3
Then the Lord called Samuel, and he answered, "Here I am."
References for 1 Samuel 3:4
He ran to Eli and said, "Here I am; you called me." "I didn't call," Eli replied. "Go and lie down." So he went and lay down.
Once again the Lord called, "Samuel!" Samuel got up, went to Eli, and said, "Here I am; you called me." "I didn't call, my son," he replied. "Go and lie down."
Now Samuel had not yet experienced the Lord, because the word of the Lord had not yet been revealed to him.
Once again, for the third time, the Lord called Samuel. He got up, went to Eli, and said, "Here I am; you called me." Then Eli understood that the Lord was calling the boy.
He told Samuel, "Go and lie down. If He calls you, say, 'Speak, Lord, for Your servant is listening.' " So Samuel went and lay down in his place.
The Lord came, stood there, and called as before, "Samuel, Samuel!" Samuel responded, "Speak, for Your servant is listening."
The Lord said to Samuel, "I am about to do something in Israel that everyone who hears about it will shudder.
References for 1 Samuel 3:11
On that day I will carry out against Eli everything I said about his family, from beginning to end.
I told him that I am going to judge his family forever because of the iniquity he knows about: his sons are defiling the sanctuary, and he has not stopped them.
References for 1 Samuel 3:13
Therefore, I have sworn to Eli's family: The iniquity of Eli's family will never be wiped out by either sacrifice or offering."
Samuel lay down until the morning; then he opened the doors of the Lord's house. He was afraid to tell Eli the vision,
but Eli called him and said, "Samuel, my son." "Here I am," answered Samuel.
"What was the message He gave you?" Eli asked. "Don't hide it from me. May God punish you and do so severely if you hide anything from me that He told you."
So Samuel told him everything and did not hide anything from him. Eli responded, "He is the Lord. He will do what He thinks is good."
References for 1 Samuel 3:18
Samuel grew, and the Lord was with him and let nothing he said prove false.
References for 1 Samuel 3:19
All Israel from Dan to Beer-sheba knew that Samuel was a confirmed prophet of the Lord.
References for 1 Samuel 3:20
The Lord continued to appear in Shiloh, because there He revealed Himself to Samuel by His word.