From the Super Mario Wiki, the Mario encyclopedia
To access this level, the timer must end with the two digits "22" (that is, "x22", where "x" can be any number) when the player reaches the Goal Pole of any World 2 level. Once the level is completed, it can be accessed again by satisfying the above condition once more.
The level begins with Mario or Luigi on the desert floor with several platforms and a green Warp Pipe which takes Mario to the sky. Before using the pipe, Mario can stand on the block to the right to make coins fall. Upon landing in the course, the screen scrolls automatically. Coins begin to fall in straight vertical lines. After that, there will be heightened platforms which the player should use to get the giant coin which falls with more coins from above. A Red Ring then appears. Going through it will make eight Red Coins parachute from the sky. Collecting all eight will put a Gold Flower in the player's inventory. Finally, the last coins fall where Mario jumps off and return to the World Map.