There are 7 main types of levels in Super Mario World. With a few exceptions, each level falls into one of these categories.
This is the most basic level type. It is characterized by a relatively small amount of ditch space and large amount of "terra firma." Because of this, the chances of falling into a ditch after falling off a platform are slim. There is no barrier at the top of the level, and often secret items can be found floating up high. An example is Yoshi's Island 2.
Elevated levels are distinguished from above-ground levels by a large amount of ditch space compared to "terra firma." Hence it is more likely than not that falling off a platform will result in falling into a ditch and dying, and so it is most advantageous to have a cape in order to avoid ditches. The distinction between elevated and above-ground levels can become somewhat blurred, and the most obvious difference is the background music; however, some levels, such as Gnarly, would be classified as above-ground instead of elevated levels, despite having different background music from most above-ground levels.
Underground levels take place underground, with a clearly defined ceiling and distinctive background music. Some enemies, such as Spike Tops and Blarggs, are found only in underground levels. An example is Donut Plains 2.
Ghost houses are easy to identify: they are the only levels with ghosts ("Boo" Buddies, Fishin' Boos, Eeries, and Big "Boo"s). Ghost houses often have less obvious exits than most other levels, and frequently also have secret exits. The game can be saved after completing a ghost house.
Castles are the dwelling places of Bowser and the Koopa Kids, and are in general more difficult than typical levels. There are 8 castles in the game. Castles never have secret exits, and always require defeating a boss at the end. Like ghost houses, completing a castle enables the game to be saved. A castle which has already been completed can be replayed in 1-player mode by simultaneously pressing the and buttons while standing on the ruins of the castle (doing this in 2-player mode brings up the life transfer utility).
Fortresses are exactly like castles except that instead of the bosses being Koopas, they are always Reznor.
Water levels are generally taking place under-water. Mario can swim by pressing the jump button. Enemies encountered in water levels are specific to these levels. However, entering a pipe can sometimes let you play a part of the level that would enter a different category of level, such as above-ground, or elevated. Water can also be found in other levels. When under-water, grabbing an object allows one to swim faster. Note that the music underwater is the 3/4 time version of the above-ground music.