Hiding. Make a Dexterity (Stealth) check when you attempt to conceal yourself from enemies, slink past guards, or sneak up on someone without being seen or heard.
If you do this during combat, then you also have to take the Hide action.
Active Search. Until you are discovered or you stop hiding, your Dexterity (Stealth) check's total is contested by the Wisdom (Perception) check of any creature that actively searches for signs of your presence.
Passive Detection. There's a chance a creature will notice you even if they aren't searching. Your Dexterity (Stealth) check is compared with the creature's passive Wisdom (Perception) score.
The GM decides when circumstances are appropriate for hiding.
One of the main factors in determining whether a foe can find you is how well the foe can see in an area, which might be lightly or heavily obscured.
Certain armor may hinder your ability to be stealthy.
If you succeed in hiding, you gain certain benefits, as described in the Unseen Attackers and Targets rule.