What your accelerator asks for in a car with an electronic throttle
On an older cable-operated design, moving the accelerator can pull a cable connected to the throttle. In many modern gasoline cars, pressing the pedal changes a sensor reading. The engine controller interprets it as a request for more or less torque. The throttle valve is one of the devices it can move to produce the response.
A motor moves the valve and a sensor checks it
Opening the throttle generally allows more air into a gasoline engine. With electronic control, a motor positions the valve and another sensor reports the position it actually reached. The controller can compare the two, using feedback to adjust the movement. The pedal position and throttle angle can take different values because the engine also responds to things such as engine speed and system requests.
That makes a familiar example possible. When cruise control is active and the road tilts uphill, the car can request more torque even though your foot never moves. When traction control intervenes over a slippery patch, the vehicle can request less torque for a moment even though you continue pressing the pedal. Other engine controls can also contribute to these changes.
Reading the feel of the pedal
Some cars change how quickly torque is requested as you press a little farther. A gentler response can make a small pedal movement feel different from the same movement in a more responsive mode. That changes how the car responds to a given position, and any effect on fuel use also depends on your road speed, acceleration and the way you drive.