From the Super Mario Wiki
Keyholes are secret level passages in the game Super Mario World. Every level represented by a red dot on the map signifies the level has a secret exit and in most levels the exit is through a Keyhole. To reach the secret levels, the player must find a Key (usually hidden in the main course somewhere) and bring it to the Keyhole. If Mario or Luigi is riding Yoshi, Yoshi can hold the Key in his mouth and simply walk to the Keyhole. When activated by the Key, the Keyhole grows in size and swallows up Mario or Luigi, along with Yoshi, if the player is riding him.
One Keyhole is also featured in the Super Mario World animated television series, during part of the "Mama Luigi" episode. Yoshi, who is a Baby Yoshi at this point, eats a key held by King Koopa. After he flees, he spits it out and into a nearby keyhole on the wall. The two coming into contact suddenly transports Mario, Luigi, Yoshi, and Princess Toadstool back to Dome City.
 Names in Other Languages