This glitch allows the player to go back to Agatha's room from Lance's room in Pokémon Red and Blue. It is a combination of both the surfing glitch and the statue behavior glitch.
1. Stand in front of the right door as soon as you enter Lance's chamber.
2. Move to the right while pressing Start, and save the game.
3. Reset the game. You should be facing right, if so do not move. Else go left, then hold right then immediately START, then save and reset. In Pokémon Red and Blue, the statue behavior glitch allows you to Surf on the base of the statues, so press Start and use Surf. Instead of going to the right, though, you should go down.
4. Continue going down, and you will be in the hallway that connects to Agatha's room.
Any method of indoors walk through walls (arbitrary code execution being a good choice here) will also enable the glitch on Pokémon Yellow.