Samuel, son of Hannah, was a Levitical priest who is generally regarded as the first of the prophets. Soon after he was weaned, his mother took him to Shiloh and consecrated him to the Lord. He was brought up by Eli, priest of the temple.
One night, as he was asleep in the temple where the Ark of the Covenant was kept, God called aloud to Samuel. Thinking that it was Eli who had called for him, Samuel went to him. Eli told that boy that he hadn't called for him, but when the incident repeated itself thrice, Eli understood.
So Eli told Samuel, "Go and lie down, and if he calls you, say, 'Speak, LORD , for your servant is listening.' " So Samuel went and lay down in his place. The LORD came and stood there, calling as at the other times, "Samuel! Samuel!" Then Samuel said, "Speak, for your servant is listening."
(1 Samuel 3:9-10)
God then informed Samuel of his intention to kill Eli's two sons, Hophni and Phinehas, because they had become corrupt beyond hope. The next morning Samuel was reluctant to tell his foster father God's message, but Eli persuaded him to do so. Eli's response was a weak willed acceptance of God's verdict.
God began revealing himself to Samuel in diverse matters now, and his fame and his influence increased throughout the land as one called to be a prophet. A new period in the history of the kingdom of God now commenced. The Israelites suddenly rose in revolt against the Philistine oppression. A fierce and disastrous battle was fought at Aphek in which the Israelites were defeated, leaving 4,000 dead. The chiefs thought they could undo some of the damage by carrying with them the Ark of the Covenant, and without consulting with Samuel, took it to their camp. A second battle was fought. The Philistines defeated the Israelites again. They stormed the camp, slew 30,000 men, and took the sacred ark. When the aged Eli heard that the ark of God was taken, he fell in shock and broke his neck.
After becoming their leader, Samuel turned the Israelites away from their idolatry, and led them to an overwhelming victory over the Philistines. This was followed by a long period of peace for Israel, during which time Samuel served as a travelling judge, dispensing justice in his home in Ramah and in the neighboring towns.
When Samuel became an old man, his sons behaved badly and the people began demanding that they be given a king to rule over them. This request wasn't pleasing to Samuel. He remonstrated with them, and warned them of the consequences of such a step, but at length after referring the matter to God he acceded to their desires and anointed Saul as their king. After Saul provided himself to be unstable and unwise, Samuel anointed David, the son of Jesse, as king over Israel.
Samuel died, aged 80 and was buried in Ramah. All Israel assembled and mourned for him.