From the Super Mario Wiki
In The Super Mario Bros. Super Show! episode "Too Hot to Handle", King Koopa and Fryguy, after they capture Princess Toadstool, activate the Lava Machine with the intent of flooding the island of Waki-Waki with lava. Hearing King Koopa and Fryguy's plan, Mario and Luigi, after sending Toad to distract King Koopa, found some tools and began work on sabotaging the Lava Machine.
Eventually catching Toad, King Koopa was informed by Fryguy that Mario and Luigi had sabotaged the Lava Machine by clogging it. Hoping to fix the Lava Machine, King Koopa approached it with Fryguy, Toad and Princess Toadstool, only to see one of it's pipes burst, causing lava to spew everywhere. Believing the situation to now be hopeless, King Koopa tried to flee with Princess Toadstool in his Fireproof Lava Boat, only to be stopped by Mario, who caused King Koopa to trip by pulling the rope of a life preserver that he had caused King Koopa to step on.
Eventually, the Lava Machine was destroyed when, becoming completely clogged and backed-up, it exploded, unleashing a wave of lava. Mario, Luigi, Princess Toadstool and Toad managed to ride this wave to the beach of Waki-Waki on the Fireproof Lava Boat, while King Koopa escaped from it using a synthetic Mask Gate; how Fryguy escaped this large flow of lava is unrevealed, but he is shown to be alive at the end of the episode.