In Hindu beliefs, the body is a shell for the everlasting soul - called "Atman". From one body to the next, one's soul continues in cycles of life and death. Hindus also believe in karma - the accumulated sum of one's bad and good deeds.
As death approaches, the soul is collected by representatives from Yama, the god of death. Each person's life's karma is recorded in a ledger. Between life and death, the soul spends a period in a type of hell ("naraka") as punishment for bad karma or in heaven ("svarga") as a reward for good karma.
Once rewards or punishments are complete, the Atman returns to the human world ("Mrutyulok"). If the soul has on balance very good karma, it is reborn as human to a good family. Conversely, the soul is reborn as human into a difficult life, or as an animal or even an insect - depending upon the severity of its bad karma.
The cycle ends when the Atman is self realized - a state called "Nirvana" - living a life only of serving good. "Mukti" is the end of the cycle when the Atman stays forever with the supreme being (in salvation or "Moksha").
Karma and rebirth are tenants of Buddhism and its related schools, such as Zen, Soto and Chan. Our life today is determined by our past lives' relationships and deeds. Those relationships are repeated in various permutations. Even a stranger one might bump into is someone with whom you have shared karma over many lifetimes.
The concept of afterlife is not central to Buddhism - spending too much energy wondering about afterlife is considered a distraction to being alive and present in the here and now. Zen Buddhism for instance focuses little on afterlife, the point being that if one does they are dead to the moment and might as well be dead. A perspective suggested is to see death as a continuation rather than an ending.
Unlike many other beliefs, for Buddhism there is no concept of the "soul". An individual is made up of a set of phenomena: physical, emotional, sensory, responses to sensory, and consciousness. Between one life and the next, these phenomena travel into the Bardo - an afterlife state - and are guided by one of the five Buddha (actually the five representations of the Buddha's five qualities: teaching Dharma (truth), meditation, giving, humility and fearlessness). After death, the phenomena disintegrate to then reform in reincarnation - the nature of which is determined by karma - or to leave the cycle of reincarnation in attaining Nirvana.
Pali Buddhism holds that only Karma comes over in reincarnation. The five phenomena mentioned disintegrate at death and are instantaneously re-embodied in the new life.
The Therevada Buddhism view has an intermediate state following death. Some versions have this as a sensory but not physical state. This state is a path to either Nirvana or rebirth, based on the person's prior life's karma. This view has elements of one's unique nature continue on into the next life.
The Tibetan tradition of Theravada holds that a person may change direction in the intermediate state from rebirth to Nirvana by letting go their previous life's desires, cares and woes. In the intermediate state the phenomena are shown as the Buddha in its various forms, both wrathful and peaceful, and then are shown memories from their past lives. If they feel emotionally connected - sad, afraid, desirous - they are reincarnated. But if they can give up desire to return to life, individuality or those they care for, they need not be reborn and their enlightened spirit will achieve nirvana.
In the Mahayana school, the afterlife is viewed as a type of heaven decorated with beautiful jewels and abundant with fruit trees, flowers, fresh water and birds; a place free from sadness, fear or want. The Buddha Field (or Pure Land) offers rebirth into a life easier to achieve than Nirvana.
In all Buddhist traditions, the ultimate goal remains Nirvana. Unlike many other beliefs, where achieving the ultimate state is within the concept of some kind of afterlife, Nirvana is a complete end - the self / the phenomena is completely dissolved. Immortality of identity is not desirable - by clinging to life, one will never achieve the ultimate goal of Nirvana.