In the Zelda 64 Engine, the physical locations of the game world are broken down into scenes (typically large locations like an entire dungeon, minus boss arena), which are then further broken down into rooms (which can usually, but not always, be transitioned between using a loading plane, door, or staircase).
Almost all scenes contain a number of invisible exit points that link up to other scenes; These exits are typically called "loading zones".
Another important trait of scenes is that the collision mesh for every room is always loaded, which means that even if a particular room isn't loaded, the ground/walls where the room should be will be solid. Furthermore, the loading zones are implemented as a special type of collision, meaning that they too are always loaded, and can always be touched to take you to the next scene even if the adjacent room isn't loaded.
Now, some scenes hold a collection of similar but disjointed rooms rather than one continuous location in order to pack things up neater. With the help of hovering, we can enter a scene with one room loaded, hover over to the area where another room should be, then touch the invisible exit point and end up somewhere else in the world.
There are two important scenes in Majora's Mask where Alternate Exit (formerly mislabeled as a type of wrong warp) leads to interesting results.
Fairy Fountains are one of the most common uses of Alternate Exit, since you can travel between Clock Town and the four corners of Termina. The five Great Fairy Fountains are positioned parallel to each other, if you run an imaginary line from the entrance straight through the center of the fountain pool. When standing in the hallway facing toward the pool, the fountains are ordered as follows:
Ikana Canyon - Zora Cape - Snowhead - Woodfall - North Clock Town
Fairy Fountain Alternate Exit can be done in as little as 8 explosives using the zora long jump to a pillar and 2 megaflips, as shown in the video below.
It is also possible to save an explosive by using a properly angled Zora Jump to grab one of the pillars. Get on one of the ledges nearest the pillar you want to get on top of. Get as close as you can to the acute corner toward the exit and put on the Zora mask. Now do a few double tap punches (ending on Zora Link's second combo punch, rather than two normal punches) to push your way to the very tip of the corner, to the point where it appears that you're floating. Turn around and align the top of the clock with the side of the pillar closest to the center of the fountain and jump. Hold up-left (or up-right) to grab the pillar.
All grottoes in the game except for Deku Playground are on the same scene. Lone Peak Shrine (commonly known as Lens of Truth cave) is also on the grotto scene, despite not being entered from a grotto hole. Here is a map of the grottoes:
There are two types of grottoes in the game; ones that set your entrance based on the current scene (just like a loading zone would), and ones that set your entrance based on a global list. The scene grottoes include Deku Playground and all the Deku Palace grottoes. Lone Peak Shrine also works this way, since it's loading-zone based. Every other grotto is global.
Entering a global grotto will cause the game to record your currently loaded scene, room, and coordinates. It restores these values the next time you exit a global grotto. If you exit a global grotto without having ever entered one since your last console reset (via Alternate Exit for instance), then the game will spawn you in The Mayor's Residence, but you'll have no control until a day transition occurs. Since exiting a global grotto can only be used to take you back to somewhere you've already been (or failing that, The Mayor's Residence), it historically has not been useful in speedruns. With the discovery of Grotto Overlay SRM, it became a much more useful option.
Entering a scene grotto does not cause the game to record these values. Furthermore, exiting a scene grotto will always send you to the natural location you'd find the grotto in the overworld. This means that you can Alternate Exit to either Goron Village (through the Lone Peak shrine) or Deku Palace (via the JP grottoes or the Magic Bean Seller's grotto) even if you haven't been there before. This technique has always been useful in MM speedruns.
The differences between these two types of grottoes, and some less common applications of their mechanics are explained by Keeta in the below video.
In certain grottoes, there will be no physical ceiling around where the light shines down and you can hover out of the room. If you're not sure if a grotto has an open or closed top, aim the hookshot or shoot the bow at the point where the light shines down. If its open, the hookshot or arrow will pass through. When you're out of the room its simply a matter of getting in bounds of another grotto.
The grottoes that have no ceiling are:
The grottoes that do have a ceiling are:
Note that Deku Playground also has a ceiling, but is not included in the main list since it's not on the grotto scene.
It's also possible to clip out of certain grottoes using a variety of methods. Regardless of the method used, clipping always requires fewer explosives than hovering over a grotto wall.
Note that Swamp Gossips grotto is the only one where it's known to be possible to use either method to get out of bounds. However, since the clipping method saves a lot of explosives, it's almost always the one being referred to during discussions of Swamp Gossips Alternate Exit.
Originally, there were two interesting uses for grotto alternate exit. You could exit the Lens of Truth cave from a generic pit or go to Deku Palace from the Ocean/Canyon Gossip Stone grotto or Akindo pit.
While it's possible to Alternate Exit in other scenes, it is typically impractical to do so due to the close proximity of the rooms relative to the world.
This scene contains two disjoint rooms: the house and the barn.
The main part of the temple is separated from the room you find Deku Princess in after beating it, however they are both on the same scene. Thus, one could alternate exit on this scene, but it would just be to slightly different coordinates in Woodfall, which greatly reduces its usefulness.
This scene contains the entire Sewers, the room with the Hookshot chest and Zora egg, as well as one disjoint section for each of the three remaining Zora eggs (each section containing the stealth room, the pirate fight, and finally the egg room).
While Alternate Exit is not useful on this scene for traveling a large distance quickly, it was used in the very first Wrong Warp to Odolwa in order to change Link's coordinates such that he wouldn't fall out of bounds and void after the wrong warp.
The four band members' rooms as well as the Zora Shop are all on the same scene.