The Zelda 64 Engine is the core engine for both Ocarina of Time and Majora's Mask.
There are three major components to the Z64 Engine: Scenes, Maps, and Actors. Scenes contain an entire area (like Kokiri Forest). Maps are smaller segments (like a room in a dungeon) of a scene. Actors are the objects and npcs that make up the world.
Only a single scene can be loaded at a time. Most scenes are comprised of multiple maps. For example, Kokiri Forest is broken down into three maps: the "village", the crawl section where you obtain the Kokiri sword, and the outside area of the Great Deku Tree.
Scenes contain a collision mesh that provides the collision data for every map in the scene. This mesh is always loaded as long as the scene is loaded. Because of this, it is possible to walk inside the "unloaded" maps without falling through.
Scenes also contain exits, which are collision triggers that load a new scene when hit. Since these exits are part of the scene rather than the map, you can always trigger an exit by reaching it's physical location regardless of what map is loaded. For example, if the "village" map of Koriki Forest is loaded, and you were to walk into where the Deku Tree's mouth would be, you will still be transported to the Inside the Deku Tree scene. Scene exits are always "on"; only geography and actor placements are used to block access to them.
While most maps within a scene are linked together, some scenes have a collection of maps that are treated as separate locations. For example, the grottos in both Ocarina of Time and Majora's Mask are stored together in one scene. Via a number of techniques, it is possible to enter the other maps within the scene; this is known as Wrong Warping. While useless in Ocarina of Time, Wrong Warping via the Fairy Fountain scene in Majora's Mask is a tremendously fast way to travel in the game, as each of the four major locations of the game have a Fairy Fountain.
Maps are essentially the segments of a scene. Each map contains graphical data and a list of various actors to load. Only two different maps can be loaded at the same, but this usually only occurs when triggering a map transition actor.
It's possible to duplicate actor lists for a map by passing through a map transition the same way more than once. This can be done by hovering around the map trigger into an unloaded room, then coming through the map trigger into the first map. Because of this type of duplication, it's possible to obtain multiple copies of select heart pieces.
Another bizarre glitch is known to exist in regards to maps. In the "main room" of the Bottom of the Well it's possible to do a variant of the Walking While Talking glitch by opening a door while the camera is fixed after exiting a crawl space. While the intended destination loads normally, the visual mesh of "main room" map and a small set of actors in it remain loaded. Furthermore, Link is left behind on the "main room" side of the door.
Actors are the objects that make the world. There are many different types of actors in Ocarina of Time, ranging from items, to dungeon objects like blocks and enemies, to NPCs, to environmental effects like sound effects and lighting, and to set pieces like Dark Link's room.
In order to save some processing power, some types of actors will not processed (and be invisible) depending on their distance from the camera and the direction the camera is facing. This results in a few oddities.
For one, it is possible to escape the forest via the "Walking While Talking" glitch. When activating this glitch in Kokiri Forest, the camera becomes locked in place on the sign next to the crawlspace. As long as the camera is locked here, the Kokiri kid blocking the exit from the forest is not processed, and subsequently the invisible wall does not exist either.
The second glitch that is known to occur due because of this is the 0,0,0 glitch. When entering a new area, the collision box for a skulltula is not set properly until it is within viewing range of the camera. Instead, it is placed at the 0,0,0 coordinate. Because of this, it is possible to kill the gold skulltula at the Desert Collossus by placing a bomb near the 0,0,0 coordinate.
One final glitch related to actors is simply known as the Hyrule Field glitch. The exact cause for the Hyrule Field glitch is currently unknown, but it is believed to occur due to the actor count reaching a set limit where no new actors can be drawn, resulting in invisible bombs and missing animations.