From what can be seen of the Lava Pits, they seem to be based on the levels of the Vanilla Dome from the Super Mario World game; possessing rivers of lava, Blarggs and Skull Rafts. It also seems that the punishment the for causing trouble in Dome City is to be banned to the Lava Pits. Conveniently, there is a Warp Tube leading to the Lava Pits in one of Dome City's dome houses, though the Warp Tube seems only one way, as it is nearly impossible to climb up it.
The Lava Pits were first seen in the Super Mario World episode "The Wheel Thing", where Mario and Luigi, after accidentally causing untold chaos in Dome City by introducing cars to the cave-people, were banished there. Eventually, Mario and Luigi escape the Lava Pits and a hungry Blargg by using a cape to fly up the Warp Tube back to Dome City.
In Super Mario World's final episode, "Mama Luigi", Luigi is sent plummeting down into the Lava Pits after an encounter with a Fire Sumo, who had stomped the ground hard enough to cause it to crack. After narrowly escaping being eaten by the T-Rex and its blue friend, Luigi and the recently hatched Yoshi managed to escape the Lava Pits by using a nearby Warp Tube, which dumped the two in the ocean.
The Lava Pits reappear in the Nintendo Adventure Book Dinosaur Dilemma as an area that Mario and Yoshi can choose to explore, though doing so will result in a Game Over when an unseen creature captures and eats them with its long and prehensile tongue, something foreshadowed by the large amount of half-eaten food dotting the landscape.