Knock Sensors can be found on DOHC Vtec motors, such as the B16, B18C and H22. Also on SOHC Vtec OBD2 motors.
A knock sensor is basically a special microphone that "listens" to the sound the engine is making. This is used by a Knock Board present in the ECU to determine if the engine is experiencing Pre Ignition, or knocking . The sensor / board usually look for the engine's Detonation Frequency.
Conventional wisdom holds that the stock Knock Board is all but useless for detecting knock in boosted applications. It appears to be a basic safeguard against bad gas, and nothing more.
Conventional wisdom says honda Knock Boards freak over forged internals, and detect knocking (false-postive) with forged pistons.
The stock Knock Sensor is often used with aftermarket knock detection devices, such as the J+S Safeguard, to detect knock more accurately in boosted motors.
See Knock Sensor Voltages for information on signals from the knock sensor on a running car.