A Tripwire Hook, when activated with String, will send a redstone signal to whatever block it's on if an entity walks across it. They are excellent ways to make a detection system spanning a corridor due to their near-invisibility; Pressure Plates are the only option for narrower areas.
The Tripwire Hooks must be placed on solid blocks straight across from each other, with no blocks between them, at most 40 blocks apart. String is then placed between them. Note that the String does not have to be on the ground; it can float.