Dvija (Sanskrit: द्विज) means "twice-born". The concept is premised on the belief that a person is first born physically and at a later date is born for a second time spiritually, usually when he undergoes the rite of passage that initiates him into a school for Vedic studies. The term also refers to members of the three varnas in the traditional Hindu social system, or social classes — the Brahmins (priests and teachers), Kshatriyas (warriors), and Vaishyas (merchants) — whose Sanskara of Upanayana initiation was regarded as a second or spiritual birth.
The word Dvija is neither found in any Vedas and Upanishads, nor is it found in any Vedanga literature such as the Shrauta-sutras or Grihya-sutras. The word is almost entirely missing, in any context, from ancient Sanskrit literature composed before the last centuries of the 1st millennium BCE, and it scarcely appears in Dharmasutras literature. Increasing mentions of it appear in Dharmasastras text of mid to late 1st-millennium CE texts. The presence of the word Dvija is a marker that the text is likely a medieval era Indian text.
"Dvija" means "twice-born": the first birth is physical, while the second birth is a 'spiritual' one. The second 'birth' occurs when one takes up fulfilling a role in society, at the time of Upanayana initiation ceremony. For example, a Brahmin is initiated into school to study and pursue Brahmopadesha (preach, counsel) in the matter of the nature of Brahman, the ultimate reality). Traditionally, a Kshatraiya would start learning the use of arms, while a Vaishya would start a trade apprenticeship.
The premise of the Dvija concept was that a person is born physically through his parents at home, spiritually through his teacher at school (gurukul) who helps the student form the mind and realize the self.
The word Dvija, and its equivalent such as Dvijati, is neither found in any Vedas, any Upanishad, nor in any Vedanga literature such as the Vyakarana, Shiksha, Nirukta, Chandas, Shrauta-sutras or Grihya-sutras. Words such as Dvijanman appear in chapter 1.60 of Rigveda, but the context is not human beings, but "fire" once born in the heaven and then brought and born again on the earth.