In modern diesel locomotives, the engine is only a part of the overall mechanism. Force from the engine travels along a drive shaft -- the entire shaft turns, and sometimes passes through a fluid coupling unit to prevent shock to the transmission, and the resulting force is transferred from the gearbox, where shifting occurs, to the locomotive wheels.
Once the turning drive shaft reaches the gearbox, it powers the gears that dictate how much force reaches the wheels (controlling speed and torque). Most modern locomotives use an epicyclic gearing (planetary gearing) system, in which several small gears rotate around a central gear, allowing the force load to be evenly distributed and giving the driver greater control over speed and shifting. The drive shaft is usually connected to a planet gear carrier, which holds the planet gears; they orbit the sun gear, which transmits power to the wheels. Therefore, force from the engine would reach the planet gears first.