There are two types of map/room changes in Final Fantasy IV: "Go" types and "Return" types. "Go" types save the player's location, and "Return" types go back to a saved location. Locations without a clear cut "Go" or "Return" purpose are "Go" types, whether coming or going. Outside, the player is at Room Level 0, but every time one enters a room the "Room Level" increments. Each time one exits something, the Room Level will decrement. The glitch can be performed in places where one can continually increment the Room Level.
If the Room Level hits 64 it resets to 0. If the player then uses a "Return" method (by exiting a Return door, or using Warp), they will be taken to Room Level -1, which causes glitches. By continuing to use "Return" one can go even further into the negatives. The Warp spell takes the player to the last point at which the party was at Room Level 0. In terms of normal gameplay, this should always be the world map, but it is possible to get to Room Level 65 and then use a "Return" door, and as far as the game is concerned, Room Level 0 and 64 are one and the same.
Anything that's a negative Room Level will use invalid data intended for other things in the game, like the positions of vehicles, in-game time, gil and the order of spells in a caster's magic list.