When you take the Hide action, you make a Dexterity (Stealth), following the rules for hiding, opposed by the passive Perception scores of creatures able to observe you. If you succeed, you gain the benefits described in the Unseen Attackers and Targets section of the Making an Attack section.