Yama or Yamarāja, also called Imra, is a god of death, the south direction and the underworld, belonging to an early stratum of Rigvedic Hindu deities. In Sanskrit, his name can be interpreted to mean “twin”. In the Zend-Avesta of Zoroastrianism, he is called “Yima”. According to the Vishnu Purana, his parents are the sun-god Surya and Sandhya. In Hinduism he is the twin brother of Yami, brother of Shraddhadeva_Manu and the step brother of Shani. He is sometimes depicted riding a buffalo.
In Hinduism, Yama is the lokapala (“Guardian of the Directions”) of the south and the son of Brahma. He has two dogs with four legs and wide nostrils guarding the road to his home. He wields a leash with which he seizes the lives of people who are about to die.
In the Vedas, Yama is said to have been the first mortal who died. By virtue of precedence, he became the ruler of the departed, and is called “Lord of the Pitrs”. Yama entered Buddhist mythology when he was mentioned in the Pāli Canon of Theravada Buddhism. He is otherwise also called as “Dharmaraja”. He is said to judge the dead and preside over the Narakas (“Hells” or “Purgatories”) and the cycle of rebirth.
Naraka in Hinduism serves only as a temporary purgatory where the soul is purified of sin by its suffering. In Hindu mythology, Naraka holds many hells, and Yama directs departed souls to the appropriate one. He may also direct the soul to a Swarga (heaven) or return it to Bhoomi (earth). Good and bad deeds are not considered to cancel each other out, the same soul may spend time in both a hell and a heaven. The seven Swargas are: Bhuvas, Swas (governed by Indra), Tharus, Thaarus, Savithaa, Prapithaa, and Maha (governed by Brahma).