A derailleur is a mechanism that allows a bicycle to shift gears by moving the chain from one sprocket to another. It is a variable-ratio bicycle gearing system consisting of a chain, multiple sprockets of different sizes, and a mechanism to move the chain from one sprocket to another. Modern front and rear derailleurs typically consist of a movable chain-guide that is operated remotely by a Bowden cable attached to a shifter 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.
The rear derailleur is the mechanism that shifts the chain at the rear sprockets. It is secured to the bike with a mounting bolt to the frame’s derailleur hanger. The upper pivot to the derailleur is connected to the lower pivot by a linkage system that forms a parallelogram. Rear derailleurs use a cage fitted with two pulleys. The lower pulley pulls backward to give tension to the lower section of the chain, while the upper pulley guides the chain to the sprockets. The derailleur cage itself is sprung towards the rear of the bike, keeping tension in the chain at all times. The length of the cage determines the amount of spare chain in the drivetrain and, in turn, the largest cog it can shift to.
In summary, a derailleur is a mechanism that allows a bicycle to shift gears by moving the chain from one sprocket to another. The rear derailleur is the mechanism that shifts the chain at the rear sprockets, and it is secured to the bike with a mounting bolt to the frame’s derailleur hanger. The derailleur cage is fitted with two pulleys, and it is sprung towards the rear of the bike, keeping tension in the chain at all times.