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.
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 Positioning Sensor
What's missing from the photo above is the throttle positioning sensor, which detects how open the butterfly valve is and sends that information to the Engine Control Unit. This information is vital in automatic transmission vehicles, which tries to determine the driver's intentions; suddenly stepping on the throttle will cause some automatic transmission vehicles to shift down a gear, assuming the driver needs the speed to pass a car or avoid a collision. A slow increase in throttle tells the computer speed isn't urgent, and stays in the same gear, or shifts early for fuel economy reasons.
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 it there is).