More throttle, more air, more air draws in more fuel (carb) or more air tells computer to add more fuel (TBI). More air and more fuel equals more RPM.
For a diesel when you step on the 'gas' pedal it just adds more fuel. There is no throttle plate so the engine speed increaes which draws in more air. That's why when you accelerate with a diesel you'll see some black smoke for a while.
Rene