Brahmacharya does not directly mean celibacy. It is a word that has evolved into it, but the literal definition of Brahmacharya is Brahma (Brahmaji, Creator) + Charya (attain, reach, dwell, to act). Brahmacharya literally means in this scenario, "to act as Brahma."
Celibacy is only 1 of the things to be a Brahmacharya. The full detail of it can be found in the Manusmriti, Chapter 2.
The brahmacārī who lives with the teacher has to obey certain rules and principles. He should bathe in the river at sun-rise and offer oblations to gods and manes. A brahmacārī has to abstain from using honey, meat, fragrance, flowers, flower of chrysanthemum (Ind.) women, curd, milk, ghee, churned-curd, slaughter, bath applying oil, anointing the eyes with collyrium, sandals, umbrella, lust, anger, covetousness, dance, music, gambling, slander, ridicule, falsehood, and causing injury to others. A Brahmacārī should go to bed alone. Semen should not be made to discharge through lust. If seminal discharge occurs in dream he should take bath early in the morning and worship the Sun, pronouncing the mantra or spell 'Punaḥ' thrice. The Brahmacārī should live on alms. It is the duty of the brahmacārī to bring water, flower for oblation, cowdung, soil and darbha (grass) for the teacher. He should receive alms only from the houses of those who believe in the Vedas and sacrifices. He should not go to the house of his teacher or his heirs and their families for alms. Provided there are no other houses he may receive alms from the houses of his teacher’s relatives and in the absence of such houses he may approach the houses of heirs to his teacher and in the absence of such houses he may receive alms from the house of the teacher. He should fetch 'Camata' (fuel chiefly from butea frondosa) from a place of purity in the forest, as instructed in rules and dry it in the sun; in the absence of which it may be got dried in a sheltered place. This fuel should be put in the sacrificial fire in the mornings, at noons, and in the evenings. If a healthy Brahmacārī fails in doing his duties consecutively for seven days it will be considered that his vow of Brahmacarya is broken and then he will have to take the vow of 'Avakīrṇi' again. Without waiting for the order of the teacher, the Brahmacārī (student) should engage himself in devotion and meditation and in the service of the teacher daily. When the student is before the teacher he should stand with folded hands controlling his body, speech, brains, sensitive organs, and mind. Only when he is asked to sit, should he do so before the teacher, covering the portions of his body, which are to be covered, with clothes. He should rise up in the morning before his teacher wakes up, and go to bed only after the teacher has retired for sleep. When his teacher calls him, he should not give reply lying, sitting, walking, eating or looking in the opposite direction. He should not gainsay the teacher. The student should attend to the orders of the teacher and comply with them, sitting if the teacher is sitting, standing if the teacher is standing, standing back if the teacher is advancing towards him, running behind if he is walking, standing close by when he is facing the opposite direction, folding his limbs when the teacher is lying or sitting near. The student should have his seat and bed one step lower than those of his teacher. The student should not sit in a careless manner in places where the teacher’s eyes could reaeh. He should not utter the name of his teacher. If anybody speaks ill of his teacher he should close his ears and run away from the spot. If a Brahmacārī scoffs his teacher, he will be born as a donkey, and as a dog if he scorns him, and as a worm if he steals the wealth of his teacher and as a beetle if he becomes jealous at the greatness of his teacher. When the teacher is angry the brahmacārī should not go near him. The Brahmacārī should not speak unasked. A Brahmacārī could sit with his teacher only when they are in a vehicle, or on a camel or in a tower or on the steps or on rocks or in a boat. He should consider the teacher of his teacher as his teacher. He should not address his parents who visit the house of the teacher, without the permission of his teacher. He should respect learned men, holymen, sons of the teacher and those who are born of his family, as a teacher. If the wife of the teacher is of the caste of the teacher, the brahmacārī should consider her as his teacher. If the wife is not of the same caste the brahmacārī needs only to stand up and make obeisance to her. A brahmacārī should not apply oil to the body of his teacher’s wife, wash her, massage her body, and comb her hair. A brahmacārī may either shave his head or grow matted hair. He should never be asleep at sunrise or sunset. For learning Vedas etc. the student should not give the teacher cows, clothes etc. as free gifts beforehand. On completion of education, when the student asks the teacher for permission to get married, he should give the teacher what he demands. A brahmacārī who has fully complied with the rules mentioned above, will attain heaven after his death.