On older vehicle designs, a simple throttle cable connects the accelerator pedal to the engine and controls the amount of fuel delivered to the engine. However, with fuel-injected systems, that has changed. Newer engines now use electronics to control the amount of fuel sent to the engine based on accelerator pedal movement. This is the job of the accelerator pedal position sensor. It's mounted to the gas pedal, and essentially translates the movement of the pedal (speed and position) into voltage, which tells the car's computer how much fuel to supply for engine acceleration.