How Stealth and Hiding Actually Work in DnD
Stealth is one of those rules that seems perfectly clear until a player says, “I roll Stealth,” while standing in the middle of a brightly lit room directly in front of three guards, and the DM doesn’t have the guts to say, “Even if you modify the laws of physics on the fly and roll 400, you will not succeed.”
A good Stealth roll does not make you invisible. Well, technically, the 2024 rules give you the Invisible condition while you are hidden, which is a confusing way of wording it, but your character has not magically disappeared. You still need somewhere to hide, and the DM decides whether hiding is even possible in the first place.
Under the current rules, hiding requires the Hide action. You must be Heavily Obscured or behind Three-Quarters Cover or Total Cover, and you must be outside every enemy’s line of sight. You then make a DC 15 Dexterity (Stealth) check.
So, no, you cannot hide behind a thin lamppost while an ogre watches you shuffle sideways. You also cannot crouch in an empty hallway and declare that you are being really quiet. There needs to be something actually preventing the enemy from seeing you.
If you succeed on the check, you are hidden and gain the Invisible condition. Write down the total you rolled because that result becomes the DC enemies need to beat with a Wisdom (Perception) check to find you.
This is where Passive Perception usually enters the conversation. If an enemy is not actively searching, the DM can use its Passive Perception to decide whether it notices you. If it takes the Search action and starts properly looking, it rolls Perception against your Stealth result.
For example, you roll an 18 to hide from a guard with a Passive Perception of 13. The guard does not automatically notice you. If the guard becomes suspicious and starts searching, it needs to meet or beat that 18 with its Perception check.

Hiding also costs an action, which people tend to conveniently forget. A rogue can usually do it as a Bonus Action through Cunning Action, but most characters cannot attack, duck behind a barrel, hide, reorganize their inventory, and finish their turn with a drink. You get one action unless something specifically gives you another option.
While hidden, your attacks have Advantage against creatures that cannot see you, and attacks against you have Disadvantage. You also cannot be targeted by effects that require the caster or creature to see you.
The moment you make an attack roll, though, you stop being hidden. The attack itself still benefits from being hidden because the condition ends after you make the roll, but once the arrow leaves the bow, everyone has a fairly good idea that somebody is behind that overturned table.
Making a sound louder than a whisper also ends hiding, as does casting a spell with a Verbal component. An enemy finding you obviously ends it too. You cannot spend six rounds loudly shouting tactical instructions from behind a curtain and then act surprised when the guards know where you are.
Moving while hidden is where the rules get awkward.
The Hide action does not directly say that stepping away from cover automatically ends hiding. Taken completely literally, this can lead to a character arguing that they are still hidden while walking across an open room because none of the listed conditions has technically happened yet.
I would not run it that way, and I doubt many DMs would. The Invisible condition gained from hiding is not magical invisibility. If you walk directly into someone’s view, they can see you. At that point, the enemy has found you and you are no longer hidden.
There is still room to move carefully between cover, cross a doorway while a guard is looking elsewhere, or creep through darkness. That is where the DM has to consider the situation rather than treating the wording like computer code. The exact RAW wording matters, but so does what is actually happening in the scene.
Stealth also covers more than the Hide action. Outside combat, the DM might call for a Dexterity (Stealth) check when the group is sneaking through a dungeon, avoiding patrols, moving quietly through a house, or trying not to wake something unpleasant.
You do not necessarily need to take the Hide action every six seconds while exploring. The DM may ask for one check to cover a longer stretch of movement, or call for another check when the circumstances change. Walking from a carpeted hallway onto a floor covered in broken glass would probably qualify.
It is also worth remembering that being unheard and being unseen are not always the same thing. You might be behind Total Cover but wearing plate armor, or moving silently through darkness while standing in front of something with Darkvision. The DM decides which senses matter and whether a check can reasonably succeed.
So, the practical version is this: you need a legitimate place to hide, you take the Hide action, and you must roll at least 15 on Dexterity (Stealth). Your result becomes the DC for enemies trying to find you. Attacking, speaking loudly, casting a spell with a Verbal component, being found, or doing something that clearly exposes you ends the effect.
Stealth is not an invisibility button. It works when the situation gives you something to hide behind and you manage not to immediately announce where you are.