A pedal assisted bicycle (pedelec) can be moved forward only when pedalling. The bicycle has a sensor mounted on the bottom bracket or pedal crank arm that can tell whether the pedals are turning or not, and activate the motor accordingly. Some pedal assisted e-bikes have a sensor measuring how hard you pedal.
Cadence sensor measures if the rider is pedalling. It works like a simple ON/OFF switch — it turns the motor on when you start pedalling and turns it off when the pedalling is stopped. The rider has to control the boost level and speed by manually adjusting the electric assist mode. The cadence sensor is cheaper compared to torque sensors, but the pedal assistance is often counterintuitive, bulky and laggy.
Torque sensor measures how hard the rider is pedalling — the harder you pedal, the more power it gives to the motor. Torque sensor amplifies your every input in real time, making you feel like a superhuman. Torque sensors give a lot more natural feeling to the ride than cadence sensors, however, they also cost more.