The PC makes a Wisdom (Perception) check, contested by each hidden enemy's earlier Dexterity (Stealth) check
The rules for hiding are given in the "Hiding" sidebar by the descriptions of Dexterity checks (here in the basic rules, or on PHB p. 177):
The DM decides when circumstances are appropriate for hiding. When you try to hide, make a Dexterity (Stealth) check. Until you are discovered or you stop hiding, that check's total is contested by the Wisdom (Perception) check of any creature that actively searches for signs of your presence.
You can't hide from a creature that can see you clearly, and you give away your position if you make noise, such as shouting a warning or knocking over a vase. An invisible creature can always try to hide. Signs of its passage might still be noticed, and it does have to stay quiet.
In combat, most creatures stay alert for signs of danger all around, so if you come out of hiding and approach a creature, it usually sees you. However, under certain circumstances, the DM might allow you to stay hidden as you approach a creature that is distracted, allowing you to gain advantage on an attack roll before you are seen.
Passive Perception. When you hide, there's a chance someone will notice you even if they aren't searching. To determine whether such a creature notices you, the DM compares your Dexterity (Stealth) check with that creature's passive Wisdom (Perception) score, which equals 10 + the creature's Wisdom modifier, as well as any other bonuses or penalties. If the creature has advantage, add 5. For disadvantage, subtract 5. For example, if a 1st-level character (with a proficiency bonus of +2) has a Wisdom of 15 (a +2 modifier) and proficiency in Perception, he or she has a passive Wisdom (Perception) of 14.
What Can You See? One of the main factors in determining whether you can find a hidden creature or object is how well you can see in an area, which might be lightly or heavily obscured, as explained in chapter 8.
The description of the Hide action reiterates that you make a Stealth check to do so, as described in the "Hiding" sidebar. It also references the benefits of hiding as given in the "Unseen Attackers and Targets" section of the rules; if you make an attack from hiding, you have advantage on the attack, and become unhidden right after the attack.
In short: a creature that tries to hide makes a Stealth check. If other creatures are not actively searching for it, that Stealth check is contested by other creatures' passive Perception.
If other creatures are actively looking for the hidden creature, they can take the Search action:
When you take the Search action, you devote your attention to finding something. Depending on the nature of your search, the DM might have you make a Wisdom (Perception) check or an Intelligence (Investigation) check.
In this case, since the player character is looking for a creature and not trying to locate a secret door, the PC makes a Perception check contested by the hiding creature's previous Stealth check made when it tried to hide.
To save time, you could make a single check for the entire group of enemies. It would work the same way, except you're just making a single Stealth check for the enemies. That Stealth check is still contested by the searching creature's Perception check. If the Perception check beats the Stealth check, all the hidden enemies are discovered.
(An alternative suggested by some others is to avoid making an active Stealth check roll altogether, and simply treat it as a passive check by contesting the Perception check with a passive value of [10 + the goblins' Stealth modifier]. Personally, I'm not a huge fan of this, as it means that unless the players think to look for the enemy, you're simply automatically deciding that the players either will or won't be surprised by comparing two static numbers to one another. When there's no rolling at all by either group, where's the fun in that?)
This isn't necessarily governed by a specific rule; it's just a time-saving measure. Note that you'd only do this if all the enemies were the same type of creature, and thus had the same Stealth modifier. If there are multiple different types of enemies, you should make separate checks for each kind of monster.