It was there, in the Sanctuary of Shiloh where Hannah, the wife of a prominent Levite, Elkanah, came to pray for a son. She had been childless for many years. And she vowed that if G‑d blessed her with a son, she would consecrate him to the service of G‑d all his life. Eli expressed to her his prayerful wish that G‑d should grant her heart's desire. Within a year she gave birth to a son, and she named him Samuel (Shmuel), who was destined to become a great prophet, and Eli's successor as judge of all the Jewish people.
Hannah's joy knew no bounds. The first few years she kept him at home. Then true to her promise, she took him to Shiloh where she turned him over to Eli to be brought up by him (Source: chabad.org)