Dérailleurs consist of a chain, multiple sprockets
and a mechanism to move the chain from one sprocket
Modern front and rear dérailleurs typically consist of a movable chain-guide that is operated remotely by a Bowden cable attached to a shift lever mounted on the down tube, handlebar
stem, or handlebar.
When a rider operates the lever while pedaling, the change in cable tension moves the chain-guide from side to side, "derailing" the chain onto different sprockets.
To both guide the chain to the selected sprocket
and maintain chain tension by taking up any slack caused by changing to a smaller sprocket,
the rear dérailleur has two pulleys
in a spring-loaded rotating cage, through which the chain rolls in an S-shaped pattern. The pulleys
are known as the guide pulley
(top) and the tension pulley
(bottom). Together they are commonly referred to as the jockey pulleys
The front dérailleur has a cage that should touch the chain only while shifting
between the front chainrings.Full Article