Perception and Searching

Oftentimes adventurers find themselves in sticky situations, with dangers all around them. A thief may find themselves in a room in some noble's mansion with limited time before the guard comes around on their patrol. Note that once you make a roll, you give it your best effort and cannot try again unless:
  1. Change your situation (for example, you had a long day so you take a rest first - this will likely only work once though).
  2. Change your approach (instead of just looking around the whole room again, you specifically search around the desk).
Perception and searching are broken down into three categories:  

Passive Scanning

If you are walking around, attentively looking and listening as you creep through dangerous caverns then this is called "Passive Scanning" and uses your Passive Perception, the higher it is the more you will notice around you. Note, however, that penalties are applied (behind the scenes) if you are not attentive. If you are talking with your allies, rummaging through your pack, concentrating on a spell then you will get a -5 penalty (disadvantage). If you are completely absorbed in whatever you are doing, training, reading, sleeping then you may get an even higher penalty or no passive perception at all - hopefully, you have someone on watch.  

Active Scanning

You are actively looking and listening. In this case, you want to describe what you are doing and specifically what you are listening to or looking for. "I am looking for seams in the floor." "Does anything catch my eye on the desk." This requires an active Perception test. The key here is that you are actively scanning the environment - using your senses (sight, sound, passive touch (like wind), smell, ...). But you are not touching or moving anything. A particularly high roll on a Perception test compared to the DC may yield information that can normally only be gleaned from active searching - maybe you notice one of the books on the bookcase is eschewed or one of the drawers in the desk has seen more recent use than the others.  

Active Searching

You are actively searching the area for something. This might be opening drawers, sifting through papers, moving books, looking under the rug, running your hands along the edge of a table. This also requires an active Perception test.  

Specificity

The more specific you are, in terms of what you are trying to do when actively scanning or searching, the less time it will take to find something and the lower the DC. Let's take for example an office with a key hidden in the third drawer of the desk that has a false bottom.   If you walk into a room, based on your Passive Perception there are things you will automatically notice. The desk with papers on it, a bookcase, a round purple rug in the middle, a couch, an oak cupboard currently closed and locked, a potted plant - it clearly needs to be watered more often.   If you say "I'm standing in the middle, scanning for anything unusual." You roll an active Perception test and may notice more things about the room. Crumpled papers underneath the desk, a dark stain in the carpet near your feet, cobwebs in the back corner - clearly this place hasn't been thoroughly cleaned in a while. This can be done in a few seconds.   Then maybe you say, "I'm going to walk around and scan the room, looking underneath and around everything, do I see anything unusual" - you might spend 10 minutes looking around the room and underneath the desk, around the potted plant, underneath the couch. The less specific and more all-encompassing you want to be, the longer it takes. This still requires an active Perception test. You are still "scanning" at this point, not touching anything. Note that especially high Perception checks may reveal information that is normally only available with searching (see below). In this case, maybe you get a 20 on your Perception test, so you notice that the third drawer of the desk has less dust covering the handle and that some dirt from the potted plant is on the floor nearby.   Next, you might say that you want to actively search the whole room. This might mean moving books around, looking inside the cupboards, feeling under the desk, opening and closing the drawers. The more exhaustive it is, then the longer it takes. This will require a Perception check. Now you are searching rather than scanning - this means you are touching and moving things around. In this case, the cupboards are locked, so you will need to deal with that before searching in there.   A full canvassing of a room might turn up the desired results but it might take a long time and have a pretty high DC, depending on how well things are hidden. What if, instead, you said: "the drawers in the desk are a likely place to hide a key, so I'm going to search the drawers." This is still a Perception check but will likely have a lower DC if something is hidden in there and a lot less time. Instead of spending an hour rearranging a room, searching every nook and cranny, you spend 5 minutes searching the drawers.   But let's say you don't find the key in the drawers, but you noticed before that the third drawer was used more recently than the others. So you decide that the key is probably hidden in there but you didn't find it. So you say, "I search the third drawer, checking to see if it has a false bottom." And this is so specific that the DC will be really low and, most likely in this case, not even require a roll at all. Of course, if you are wrong, maybe the key is hidden in the potted plant than you find out that this is just a regular drawer.  

Active Investigation

Investigation is used to use clues to figure out what something means or how it works. For example, if you find a secret door while scanning or searching a room but it is not clear out to open it, Investigation can be used. Another example, you know that a secret compartment is likely in the drawer but due to high-quality construction, you can't see or feel any evidence of it. You can use Investigation to figure out likely methods used to gain access to the secret drawer (other than smashing it open, which is always an option - though it may be a poor choice).  

Summary

So to put it simply, the more narrow and specific the action the less time it takes, and the lower the difficulty (generally). Passive Perception is automatically used to determine what your characters notice just by being attentive. Of course, being less attentive will result in penalties - so it's usually a good idea to have attentive scouts or people on watch. Active Perception can be used for scanning the environment - mainly listening, looking, and smelling - however other senses, like touch, can come into play in some cases (such as feeling a draft). Next, active Perception can also be used for searching the area - touching, moving things around, opening, and closing objects. Finally, active Investigation can be used to determine possible hiding places, how to open secret compartments, how to open secret doors, or how to interpret clues (such as markings scratched into the wall).