DM identifies if the check is an opposed check or will target passive Perception. (See below). If it's opposed: The DM roll the Perception check. Else, he uses the Passive Perception as a base DC

Compare the two numbers. The highest
result wins the action. So if the Perception check is higher, they
notice you.

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.

Passive Perception DC = 10 + Perception bonus

Passive Insight DC = 10 + Insight bonus

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.

Also it's not always an opposed check. As you may have noticed D&D 4E have passive Insight and Perception (equals to 10 + skill bonus) and unless the NPC is actively looking for you, you roll vs. Passive. A guard reading a book would be Passive Perception. But a guard patrolling an area will be an opposed check.
–
MrJinPengyouJul 16 '12 at 18:42

Could you describe in a (your or a different) answer the mechanics and intention of passive checks? It deserves an answer of its own and is a good way of discussing skill DC and opposed checks.
–
Brian Ballsun-StantonJul 16 '12 at 19:01

+1 for an excellent description of active vs. passive. One note though since you mentioned fighting -- my understanding is that, in combat, enemy creatures as assumed to be always actively looking for the players, so all stealth checks are opposed? (That's how I've always played it, at least.)
–
Michael EdenfieldJul 17 '12 at 2:43

I think that deserves a question on it's own. It's a good question. Could you make one with a related question link to mine?
–
MrJinPengyouJul 17 '12 at 13:37

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.

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:

How do you become Hidden? You roll Stealth at the end of any Move
Action or any of your Actions (even Free Actions) during which you
move.

"Move" is defined in the PHB3 glossary as, roughly, to leave one
square for any reason to enter another square. You can't roll Stealth
after Forced Movement since that's not your action. You CAN roll
Stealth after a granted Free Action.

You must also meet three requirements:

You must not be visible,
which means Total Concealment or Superior Cover, at the end of the
move.

Your Stealth roll must beat the Passive Perception of anyone
you want to be Hidden from

You cannot have HAD Hidden at the start
of the action and lost it during the action. Which is to say, you
can't BECOME Hidden as part of the same action that loses your Hidden
state.

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?"