A knock sensor is a knob-like part that is linked to the car's engine. As the name implies, it senses knocks in the engine. Wells Manufacturing, a company that produces knock sensors, likens the sound of an engine knock to marbles against metal.
One of the purposes of a knock sensor is to monitor the performance of the engine. If there is a problem, the knock sensor will send a signal to the PCM (Powertrain Control Module--the car's computer).
Knock sensors also protect car parts from the damaging effects of engine knock. When a knock sensor is bad, it can't regulate the engine properly. The car vibrates and it sounds like there is something banging up against the car's cylinder. The knocking action can destroy the pistons, rods, valves, gaskets and plugs.
A knock sensor is important to a car's fuel efficiency. It helps the car balance its timing and fuel-to-air mix, which optimizes the amount of power to the engine.
Failure to replace a bad knock sensor over an extended period of time can possibly lead to extensive and expensive damage to the engine.