Stealth is not invisibility. You can be detected by others. Monsters that detect you may stop in their tracks and turn to face you, or attack you directly. Players that detect you will hear a sound, and will be able to target you. The chance of detection increases as you get closer, but also depends on the viewing angle (stand right in front of an enemy and you can guarantee they'll see you), the relative levels, and any perception or subtlety modifiers.
Taking any action such as looting or attacking will remove stealth. There are a few exceptions, such as [Distract], or [Pick Pocket]. Also as of patch 2.1.0, sapping an opponent does not remove the rogue's stealth.
Most damage taken (including from AoEs or DoTs) will remove Stealth. However, fall damage will NOT remove Stealth.
Fear AoE's and certain other AoE's will remove Stealth.
Enemies much higher in level will tend to see through Stealth from quite a distance.
Enemies you are in front of will see through Stealth as you get closer.
You cannot enter stealth while in combat. However, Rogues can use [Vanish] to equivalent effect. Note that if you have a DoT the Stealth will break the next time it damages you.
Certain enemies, also called truesight, are immune to stealth. These are normally extrasensory beasts (hounds or wolves who can smell/hear the player), extremely powerful boss characters, and certain magical creatures. These anti-stealth NPCs can be recognized by a symbol over their head, of a blue sphere with a roving eye. The symbol appears once you enter stealth, but is not visible when out of stealth. These creeps will thus react to you as if you were not stealthed, and aggro normally. However, they won't be able to see you when their backs are turned, so it is possible to sap truesight humanoids, but requires skill and perfect timing.
It is possible to eat and enter stealth, to reduce your chance of being seen while eating. This is useful, especially during PvP, where a certain crit can be fatal, or when going afk for a few minutes while restoring health.
Applying poisons to your weapons does not break stealth.
Patch 4.2.0 (28-Jun-2011): Stealth now once again begins its cooldown once the rogue leaves Stealth.
Patch 4.1.0 (26-Apr-2011): Stealth base cooldown has been reduced to 6 seconds, down from 10, and the movement penalty from being in Stealth has been removed.; Certain non-damaging AoE attacks cast by NPCs will no longer break Stealth.; Hostile pets should now be less inclined to follow rogues that are in Stealth.
Patch 4.0.6 (8-Feb-2011): Stealth is no longer broken by enemies using Demoralizing Shout or Demoralizing Roar.
/Patch 4.0.1 (12-Oct-2010): Stealth is available at level 5.
Patch 3.3.0 (08-Dec-2009): This ability no longer has multiple ranks. While active, the single rank of this ability (available at level 1) allows rogues to move at 70% movement speed.
Patch 2.3.0 (13-Nov-2007): If you are in Stealth and try to use an ability that may not be used while stealthed, you will leave stealth and use that ability. This can be disabled with: /console autoUnshift 0
Patch 2.1.0 (22-May-2007): Stealth will now be broken correctly by damage shield such as Oil of Immolation.
Patch 2.0.3 (09-Jan-2007): Resisted spells will no longer break "Stealth"/"Vanish".