In an almost Greek depiction of hell and heaven, which is commonly shown in Dante's Divine Comedy, the Maya idea of the underworld had nine levels with tricky demonic creatures trying to destroy you and 13 levels of climbing the glorious Tree of Life until you reached the top of the heavenly mountain. They saw death not as a release from toil, damnation or a blessing, but just another journey to undergo in the cycle of existence.
The idea of the underworld came with its own legend, too. The Hero Twins were told of in the Popol Vuh. It all began with a couple of the children of one of the gods, who was lured down to Xibalba to be sacrificed. When his head fell off, it became a piece of fruit that spit out a seed to impregnate a goddess. She went on to bare the twins. The story continues to tell of the twins bringing sacrificed people back to life, which impressed the gods enough that they wanted more proof of the brothers' powers. The twins tricked them and left them dead, however, and thus kept Xibalba an underworld full of trials and wretched souls.
Each of the after-death zones in Mayan mythology consisted of multiple levels. Instead of the European view that heaven and hell were permanent places for different quality spirits to end up in, the upper, middle, and under worlds were frequently temporary abodes only. The middle world, being the normal Earth for living people, only has one level. The Ceiba tree of life grows through all the layers.