The life span in vedic India was divided in 4 parts, each of 25 years. These were called Ashrams.
For Hindus the whole life is a Yagya and that is what this denotes.
These ashrams were named following:
1)Brahmcharya Ashram (Upnanyan Sanskaar-25 years)
After Upnayan Sanskar the person will go to Gurukul. Under the guidanace of reverred guru, he or she will study Vedas.
The vedas have differebnt parts or Angas. Vedas have knowlege of Adhyatm (Brahm), material and life...They will study and practise those till the age of 25. During this time they will live away from parents.
During this they could not marry they had to maintain celebacy. The name Brahmcharya means the practice(of Yoga) on Brahm or actions carrying towards Brahm.
Since in this Ashram celebacy was required so Brahmcharya also referes to celebacy. Not only Brahm Gyan was the focus, pupils also learnt various skills (Aayurveda, Shastra Vidya..) during this period.
2)Grihastha Ashram (25 years - 50 Years)
After the age of 25 years people will get married and do work according to their skill set. They will have children and they will make sure that their children get Vidya (education).
There is a shloka which means "that mother is an enemy and the father is an ill-wisher who do not send their child for education".
3)Vaanprastha Ashram (50 years - 75 Years)
In this Ashram people will still live in society and with family (spouse and children and grandchildren) but they will maintain celebacy and live with Niyama.
4)Sanyaas Ashram (75 years - 100 Years)
At this age person will leave general society and live with Rishis in some jungle and fully meditate upon Brahm(GOD).