The throttle body is the part that lets the driver control the engine speed. It is an assembly with a flap inside (which is called a butterfly valve) that opens up as the driver presses the throttle pedal, and closes as the driver stops pressing it. This variable restriction controls how much air can get through, and how easily it does so. The way throttle linkage is set up can change the feel of the gas pedal by changing the rate it opens at varying levels of input.
The engine's idle speed is typically adjusted somewhere on the throttle body, usually by a screw that changes the resting position of the control flap. Some throttle bodies have more than one flap, because just making a single one larger makes the throttle jumpy (which describes the condition when power arrives unexpectedly quick). Some of the more advanced multi-flap throttle bodies keep one butterfly valve closed until about 50% throttle is applied, and upon reaching the threshold, opens more quickly than the other flap to finally open fully just as the first one also opens fully.
Below is a picture of a disassembled throttle body with all the parts laying around the main component. The spring on the middle left is designed to pull the butterfly valve closed after the accelerator pedal is released, and prevent it from being stuck open. There are rubber tubes and clamps (bottom left of the picture) here because this particular design has coolant passageway to defrost this throttle body in cold climates, so ice doesn't prevent it from opening or closing all the way. The butterfly valve is the coin-like object with the two holes in the top left of the picture; those two holes are where the screws hold it in place on the rod in the right of the picture, which is what the throttle linkage cable is wrapped around.
The Throttle Position Sensor
What's missing from the photo above is the throttle position sensor, which detects how open the butterfly valve is and sends that information to the Engine Control Unit.
Other Sensors & Components
Some components must come either before or after the throttle body, because when the butterfly valve is closed, negative pressure (a vacuum) builds up behind that valve. For instance, the mass air flow sensor would give faulty readings in that vacuum, while the manifold absolute pressure sensor needs to be able to detect that vacuum (and how much of one there is). The idle air control valve allows the engine's computer to control how much air passes by the throttle body so a proper idle speed is maintained.