Buddha accepted the basic Hindu doctrines of reincarnation and karma, as well as the notion, common to most south Asian religions, that the ultimate goal of the religious life was to escape the cycle of death and rebirth (samsara). Buddha asserted that what kept us bound to the death/rebirth process was desire, in the generic sense of wanting or craving anything in the world of samsara.
Hence the goal of getting off the ferris wheel of reincarnation necessarily involves freeing oneself from desire. Nibbana-- or, in later Buddhism, nirvana--is the Buddhist equivalent of moksha.None of us can avoid death and if we are not free from the vicious cycle of death and rebirth, we are doomed to the endless cycles of life and death and its paradoxical nature of suffering, of happiness and sadness, youth and ageing, healthiness and sickness, pain and death, all because we are so attached to the existence in the first place.
Buddhism tells of many hells, of which Avici is the most terrible. They are of course all temporary and therefore purgatories rather than places of eternal punishment and the beings that inhabit them have the power of struggling upwards and acquiring merit, but the task is difficult and one may be born repeatedly in hell.
The phraseology of Buddhism calls existences in heavens and hells new births. In Buddhism there are 37 different levels of heaven where beings experience peace and long lasting happiness without suffering in the heavenly environment.