An idler gear is used to spin a driven gear inside a mechanism. The driving gear is the component that sends power to the idler gear, which than spins in the opposing direction, so the driven gear can spin in the proper direction.
Gears work in unison with each other. However, when a driving gear spins in one direction, the next gear it turns will spin in the opposite direction. Therefore, an idler gear is used as a substitution for the driven gear, which is then allowed to spin in the same direction as the original driving gear. Idler gears are also used to fill in the gaps between the two set of gears.