An accelerator pedal position sensor is a component of the floor pedal that you press to actuate the throttle on your engine.
On older vehicles with mechanical throttles and accelerator pedals, a cable extended from the pedal to the throttle valve. When the driver pressed on the accelerator pedal, the cable actuated the throttle valve in a similar way that a bicycle hand brake lever actuates the brake pads to squeeze the wheel. Press on the pedal, move the cable, open the throttle, and the engine RPMs accelerate.
That is no longer the case with modern vehicles that rely on drive-by-wire technology. Now, all of the messages between the accelerator pedal and the engine are sent electronically. No more cable. Instead, when you press on the pedal, the accelerator pedal position sensor detects how much it has moved. That data is converted to voltage and sent through a wire to the engine control module (ECM), and the ECM tells the throttle how much to open or close.
Not to be confused with a throttle position sensor attached to the throttle body of your engine, an accelerator pedal position sensor is usually mounted adjacent to the accelerator pedal inside your vehicle. To replace the device, a technician will first disconnect the negative terminal on your battery, taking care to preserve the vehicle computer memory.
It might be necessary to remove lower dash panels for access. The pedal assembly might also need to be removed in order to install a new sensor. In general, the sensor is unplugged from the wiring harness, unfastened from its mount, replaced with a new sensor, and plugged back in. Once all components are back in place, the technician might have to reset the check engine light to remove any stored trouble codes.