According to the tradition prescribed in the Gṛhyasūtras and Dharmaśāstra, one of the most important saṃskāras for a male belonging to one of the three higher varṇas. Most immediately, it marks the beginning of a period of Vedic studentship (brahmacarya) under the direction of a teacher (ācārya), which, once completed, qualifies the individual, at marriage, to set up the sacred fires and become a gṛyha or śrauta ritualist. In the longer term, therefore, upanayana is an essential prerequiste for becoming a householder (gṛhastha), and so a full member of traditional, high-caste Brahmanical society. In this way it constitutes an individual's ‘second birth’, hence the epithet dvija, ‘twice-born’, applied to those who have undergone it.
What in the early Vedic period is a relatively simple ritual becomes, in the dharma literature, a matter of some complexity, with considerable variations, depending on whether the inititiate belongs to the brahmin, kṣatriya, or vaiśya varṇa. There is no general agreement about the proper age for upanayana, but usually some point between the individual's eighth and twenty-fourth birthdays is prescribed, on the principle the higher the varṇa the lower the age. Among a complex of symbolic actions which purify the individual prior to his being given access to the Veda, the initiate has his hair shaved and his nails cut; he is ritually bathed and dons a new garment (traditionally an antelope skin and a girdle of twisted muñja grass); he may also be taught a basic form of prāṇāyāma. As a specific initiation into the Veda, his teacher then whispers the Gāyatrī mantra into his ear, and gets him to repeat it. Most of this is accompanied by oblations into the fire and mantras, and the initate himself is taught some basic ritual gestures. The upanayana is concluded by a meal, marking the boy's transition from a dependent child to adulthood, and, for those undertaking the āśrama of brahmacarya, a symbolic entry into the actual process of soliciting alms. The investiture with a sacred thread (yajñopavīta)—subsequently performed as a central part of the ritual, before the revelation of the Gāyatrī mantra—was absent from earlier accounts of upanayana, but over time it has come to be synonymous with it. In the modern period (with the exception of some traditional brahmin familes) the ritual has generally been compressed or collapsed into the marriage ceremony, mirroring Manusmṛti's view that marriage is the equivalent of upanayana for females.