The Cyberswine Labs level provides a great example of folded level design. A 'fold' in the level occurs when the player has to backtrack through areas they have already visited. While backtracking can easily become tiresome if those areas are now empty and devoid of challenge, a folded level can retain interest by changing the way the player interacts with the environment the second time through and providing challenge variation. A folded level can be broken down into "the way there" and "the way back". The way back often provides the more difficult or complex gameplay.
In the example in the video above Rocket Knight has to ride the moving platforms down through a maze of dangerous energy beams. As the platforms lower the player must Rocket Burst between them to avoid the beams. On the way down gravity is on the player's side so they can simply fall down on to the next platform as they drop below.
The Rocket Burst ability forces the player to commit to moving in a fixed direction and is restricted by their fuel supply (which is limited in the ice level). But it doubles as a fast attack and is the strongest tool the player has to defy the platform game's most persistent obstacle: gravity.
However, when the level folds (when the player hits the switch at the bottom and reverses the direction in which the platforms move) the player has a new layer of difficulty added to the challenge. Because the platforms are now moving up, the player has to fight against gravity to keep up with them by jumping as well as Rocket Bursting in a test of precision timing at a fixed pace.
A second overarching fold occurs in full glory during the dramatic escape sequence at the end of the level. Rocket Knight destroys the laboratory core, setting off a massive explosion which constantly swells in size. The player must now backtrack through the entire level with the explosion hot on their tail (literally -- Rocket Knight is an opossum). So the way there features all the standard level design features and challenges the player is used to in the game, while the way back entails a test of speed and precision timing, as well as a slightly modified path to allow short-cuts and less stilted movement through the level. The whole thing now mostly takes place above a bottomless pit, meaning the constant force of gravity is always working against the player.
After the second fold, most players will probably race back through the aforementioned 'moving platform energy beam room' so quickly that they won't even realise they've passed through it twice before. Thankfully, the beams and platforms have now deactivated so Rocket Knight can burst freely and bounce off its walls at great speed.
Through this smart level design, Rocket Knight gets extra mileage out of its restricted space (as nearly all game spaces are restricted) without ever becoming repetitive or tedious.