As with virtually all Hindu beliefs, beliefs about the afterlife in Hinduism are varied and complex.
Most Hindus believe in reincarnation (Sanskrit samsara), in which the soul (atman) is born into a different body after death. The condition of this new life is based on karma, or the actions one has performed in past lives.
The ideal afterlife is to escape this cycle altogether and achieve liberation (moksha), which is variously understood as unity or merging with the Supreme Being (Brahman), perfect communion with Brahman, or a blissful state in a heavenly realm.
Alongside this mainstream philosophical view, ancient popular beliefs about the survival of human souls as ancestors (pitr) and ghosts (pret, bhuta) still exist in some Hindu communities, which can be seen in rituals intended to please and appease the dead. Other popular beliefs include the existence of multiple heavens and hells, a journey of the soul after death, and a last judgment by the god of death (Yamraj).