From the Super Mario Wiki
The Warp Zone is a hidden area that acts as a kind of teleportation system, connecting many worlds to one place.
In Super Mario Bros.: The Lost Levels, Warp Zones function identically to those in Super Mario Bros. They no longer, however, give the player a choice of destination, as every zone contains only one pipe. Some Warp Zones send the player to an earlier World; for instance, the Warp Zone in World 3-1 leads to World 1. The World 1 warp zone has a gap so Mario can die instead of entering the pipe, but this gap doesn't exist in the World 5 warp zone (accessed from World 8-1).
In The Super Mario Bros. Super Show!, King Koopa would sometimes make his getaway at the end of an episode by throwing a Magic Potion and creating a Warp Zone (usually a door or a portal), which he would escape through.
Characters in Captain N: The Game Master frequently used Warp Zones for means of rapid transit, with the Warp Zones of Super Mario Bros. even being referenced to in the show's first episode.
In Super Mario Bros. 3, World 9 is an island and that may only be accessed via Warp Whistle. It is the Warp Zone that connects to the other kingdoms of the Mushroom World, although it was not completely interconnected to access the top row, one had to warp from World 1, accessing the middle row was possible by warping from Worlds 2-4, and the last world from later on. Super Mario Advance 4: Super Mario Bros. 3 referred to the Warp Zone as World 9 Warp Zone.
In New Super Mario Bros., secret exits in levels 1-Tower, 2-A, 3-GH, 4-GH, and 5-GH lead to cannons which launch Mario or Luigi to a later world (the first two to World 5, then 6, 7, and 8, respectively). Advancing to a new world regularly was probably replaced by the World Map.
The Warp Zone also appears in the game Super Mario 3D Land and Super Mario 3D World. They are in the same places as they were in the original Super Mario Bros., in World 1-2 and World 4-2. However, there is only one orange pipe, and they only warp the player to the next world.