The classic accelerator pedal is sometimes called the throttle... for good reason. All it does is control the amount of air entering the engine.

The throttle does not directly dictate what rpms the engine runs at. It just lets in more air. The fuel system, whether computer-controlled injection or regular old carburated fuel delivery, reacts by pouring in more fuel. Certainly, when you floor the throttle, the engine will rev faster, but both medium and full throttle will make it rev at the same rate. Maximum engine acceleration (how quickly it reaches full revs) is more a factor of internal friction and inertia than the throttle itself. In other words, the engine only revs faster at higher throttle openings because more air and more fuel give it more power to move its own weight.

The more air-fuel mixture in the engine, the more power it makes. If there is absolutely no load on the engine (let's say it's perfectly frictionless), even with just a tiny bit of air-fuel mixture, it'll rev to redline (a limit imposed by how much fuel the carbs can flow (carburated) or by the computer cutting spark and/or fuel (Electronic) to prevent the engine from blowing up.)

When you put load on the engine, it'll rev slower, so you need to add more air and fuel to keep the revs up. This is what happens when you engage the clutch.