In many manuals, reverse gear uses an idler gear to reverse the output shaft direction. A normal forward gear pair has two gears meshing, which makes the driven gear rotate opposite to the driving gear. Adding a third gear between them reverses the direction once more, allowing the output shaft to turn in the direction needed for the vehicle to travel backward.
The reverse idler is usually separate from the constantly meshed forward gears. In older sliding-mesh designs, selecting reverse physically moves the idler into contact with gears on the input and output shafts. Many modern transmissions still use straight-cut reverse gears, which explains the familiar whining sound when backing up.
An idler gear changes rotational direction but does not, by itself, determine the overall gear ratio; that ratio depends on the input and output gears. Reverse is also commonly unsynchronized, so selecting it while the input shaft is still spinning can produce a crunch. Some newer gearboxes add reverse synchronization to reduce that problem.