Levitation can refer to:
The items and spells above, although they have the word "levitation" in their names, allow the user to move in the x and y dimensions at will while being above the floor or ground in the z dimension. This is a difference from, for example, the Dungeons and Dragons games, in which levitation only allows controlled z-dimension movement.
Levitation is still not equivalent to flying in NetHack, however--flying creatures can go down stairs, for example, while levitating creatures can not. Flying will also allow you to dip objects into water, while levitation will not.
Levitation poses certain hazards in NetHack, which are compounded by the fact that a player's levitating status is not visually indicated on the screen. In fact, it is a bit of a puzzle to determine whether you are levitating if you don't know! Try engraving with your fingers--you won't be able to reach the floor if you are levitating. Due to this, you also cannot pick up items from the ground if you are levitating. Problems for the unwary can include being unable to move boulders and having potions shatter when you drop them on an altar for B/U/C identification. Levitating players are still affected by most traps (magic traps, e.g.) over which they pass, with the notable exceptions of ground-based traps such as land mines and pits, both spiked and unspiked.