Basically they are a potentiometer. Voltage rises when the pedal is pushed. The Computer sees the increase and does a calc to determin "pedal position".
When you go back the other way when it hits the Idle validation switch that tells the pcm the pedal is at rest and to kick into the idle settings.