I was reading the Players Handbook 1 and I don't understand how the opposed check works, especially in context of a stealth check.
Let's go step by step.
Opposed roll vs. Passive DC
In D&D 4E, not all skill checks will be opposed to another skill check. In some circumstances a skill check can be made against a Passive DC. Only Perception and Insight have a passive DC.
A simple example is when a character is doing something else. Fighting, reading a book, sleeping etc. If a character doesn't declare he's looking for something or actively listening, assume he's using Passive Perception. Same for Insight.
Notice there are no Passive Stealth or Climb. This is how I understood when to use passive vs. opposed roll. An "active" skill check requires your full attention and awareness.
Usually an NPC that will sneak on a player or try to lie will always target the Passive skill DC unless the player mention he's actively paying attention.
As a DM, if you believe that your NPC would have a reason to be actively searching (Perception) or paying close attentions to your words and gesticulation (Insight) then use the Opposed check method.
In any other situation, assume Passive DC.
Stealth is never an opposed roll.
The mention of Stealth as an opposed roll in the original Player's Handbook on page 178 is a red herring, especially since the rules for Stealth were significantly revised. Here is a brief explanation of those revisions:
Stealth works by having one creature make a stealth roll, which is opposed by the Passive Perception of each enemy creature in the encounter. If this roll beats all the passive perceptions, the creature is now Hidden (is invisible and silent to each enemy). The roll now becomes the Stealth DC to find the creature.
On the enemy's turn, it may take a minor action to roll perception to search for any hidden creatures. In general, this means they only take this action if they know you are hidden - in other words, this would be taken in combat but generally not during exploration. This would be a Perception Check against the Stealth DC determined when the creature became hidden.
In both cases, a tie goes in favor of the roll: the creature attempting to hide successfully hides if they tie the passive perception; the creature attempting to find a hidden creature successfully finds it if their active perception roll ties the prior stealth roll.
This guide on the Wizards Community Forum is very effective at explaining the way stealth works in D&D 4th edition:
Opposed rolls are rare and generally happen outside of combat, as has been clarified since the publication of the original Player's Handbook. These could include bluff vs insight, where both creatures roll their skill, during a conversation where both are actively using their skills to sway the conversation in their favour.
For example, PHB p.183 describes Bluff being used to gain Combat Advantage as a Bluff vs Insight opposed roll; Rules Compendium p.141 amends this to indicate that the in-combat use of Bluff is against Passive Insight.
The central tenet of D&D is:
You succeed in a "check" if you roll a 1d20+a modifier above the target difficulty class.
The rules of D&D have gone through many revisions, and your question touches on something that has been changed so often even I have to look it up when I want to play with it.
I touch on The Rules of Hidden Club. I don't recommend reading it until you have a mastery of the general rules down, but it will be a handy resource later.
The central part is important here:
D&D has mostly done away with "opposed rolls" in favour of passive rolls. (Precicely why you're having a bit of a hard time figuring out what these opposed rolls look like.)
Here's an example.
We have a goblin. Let's name him Dies Horribly. Dies horribly is trying to sneak past Bob the guard.
Bob the guard, being a good and consciencious guard, has stationed himself in a completly dark hallway. Cause he's heard that that is what one does.
This gives dies horribly total concealment. This means that he can try to hide!
He moves 2 squares forward, and rolls a stealth check. This is a 1d20+a modifier. His modifier is 5 (because he's trained in stealth) + 4 (he's got a high dexterity) and +0 (because he's level 1.)
He rolls a 2.
Bob has a passive perception of 12. He's a good guard, despite being a bit... dull.
2+(9) is 11. ... Dies horribly is caught. And lives up to his name.
Passive perception and passive insight are ways to avoid "contested" checks. Instead of having monster and PC roll off, the "passive" component sets a difficulty for the active check of stealth or bluff.
On the other hand, if you're searching for clues, trying to spot a secret door, or any of the other "perceptive" activities, you'd roll perception normally. 1d20+modifier versus a DC set by the DM.
All checks in 4th edition work the same way. 1d20+modifier versus a number. It's just a question of "what's the modifier?" and "What's the DC?"