Most religions believe in some sort of continued existence after we die, whether it is in some peaceful paradise, a hellish land of punishment, or simply a continuation of the soul or essence in a new life. This continued existence is known as the afterlife.
While some religions do not specify a single clear theory about what the afterlife will look like, most have detailed descriptions about what we can expect after death, as well as how our time on Earth affects this afterlife.
According to Buddhism and Hinduism, we do not just live one life; we live many. After we die, our soul reincarnates into another life, which will be better or worse depending on how we conducted ourselves during previous lives.
According to Buddhism, there are six realms where you can be sent, none of which are permanent: paradise (heaven), hell (suffering), reincarnation as a human or other animal, hungry ghost (constant dissatisfaction), or Asura (constant fighting).
According to Hinduism, Karma determines where you are sent too, but the levels are less clearly defined (you can reincarnate as just about anything).
In both of these traditions, the cycle of life and death continues until we reach a place of self-actualization and peace, known by Buddhists as Nirvana and by Hindus as Moksha.
After reaching this point of enlightenment, souls are released from the cycle of life and death and from all suffering. Ultimately afterlife is where you will be rewarded or punished for your actions while alive.
The good and the believers are saved from suffering and the evil or unbelievers suffer for what they have done wrong. So, in the end, whatever you believe about the afterlife, good deeds and kindness while on Earth are part of the key to a good afterlife
Life is a journey. Death is a return to Earth. The universe is like an inn. The passing years are like dust. Regard this phantom World as a star at dawn, a bubble in a stream, a flash of lightning in a summer cloud, a flickering lamp – a phantom and a dream. – Buddha