A secret level is an optional level accessed from a generally concealed alternate exit. Since the secret level uses this second, less accessible exit, the game or episode it forms part of can be completed from start to finish without progressing through the level. A super secret level is a secret level accessed from a previous secret level, as seen in Doom II.
In Doom, secret exits could only be set up as switches. In Doom II and Ultimate Doom, secret exits could be triggered by walkover lines as well. The source port Boom added exits triggered by impact weapons, including secret exits, which are consequently available in any Boom-compatible port.
Secret levels in Doom
If the player activates a secret exit on a level they are not meant to reach a secret level from, they will go to the secret level, as usual. However, upon completing the secret level, the player will be taken to the level immediately following the level they were meant to access it from. Depending on the specific episode and level this occurs on, the player may end up either skipping several maps, repeating the level they just left, or being sent back to an earlier level. One example where this behavior occurs is MOUNTAIN.WAD, where the secret exit is placed on E3M5, which results in the player skipping E3M6 upon finishing E3M9, instead going directly to E3M7. Another example can be seen in DARKHELL.WAD, where the secret level is accessed from E2M6; upon completing E2M9, the player must play E2M6 over again.
Secret levels in Doom II
Doom II has two secret levels: MAP31 and MAP32. The first is accessed from MAP15, and the second is a super secret level accessed from MAP31. Both TNT: Evilution and The Plutonia Experiment, being originally designed as Doom II megawads, follow the same pattern, except that MAP31 in Plutonia does not have a normal exit to MAP16.
If the player uses a secret exit on a map they are not supposed to reach a secret level from, they will end up repeating the level over again. If the level was reached by using IDCLEV or the -warp command line parameter, they will be warped to MAP01.
Secret levels in Doom 64
Doom 64 has three secret levels, one super secret level, and three hidden levels. The main three secret levels, MAP29, MAP30, and MAP31, can be accessed through hidden exit switches and teleporters in a chronological order not unlike Doom and Doom II, but in a more unique approach; rather than getting to the secret levels halfway through the game, the three maps are accessed from stages in different parts of the game (the exit to MAP29 is found in MAP04, MAP30 is entered in MAP12, and MAP31 can be accessed in MAP18). Maps 29 through 31 also offer the player more incentive when it comes to getting to them; each stage has a singular Demon Key artifact that can be found and used to power up the Unmaker weapon and to close three demon teleporters in MAP28, making beating that particular stage much easier.
Doom 64's super secret level, MAP32, is accessed from MAP01, and again has incentive in its discovery; if the player is successful in getting to the level's secret exit, he will be able to access the "Features" menu, thereby unlocking many different cheat options. Going through the normal exit will bring the player to MAP02, but without the "Features" menu. Getting to MAP32, though, is a rather unique challenge; the player must destroy all the toxin barrels found in MAP01, and destroying the last one will temporarily lower the lift that grants access to MAP32. However, this is a one-time thing, and if the player does not make it to the lift, he will either have to get through the stage all over again or forsake going to MAP32 as a whole.
Doom 64's three hidden "fun" stages, MAP25, MAP26, and MAP27, are not accessed from specific levels but rather from the game's "Features" menu. These levels don't offer much and are rather short in approach, but, as the nickname suggests, are put in for "fun". Strangely, while their chronological order places them between levels 24 and 28, beating MAP27 will bring the player to MAP01.