Internal combustion gasoline engines require three things to operate: oxygen, fuel and a spark. On modern engines, fuel delivery and spark timing are handled by a computer controlled system of pumps and actuators. Air delivery is a bit more analog, which is where the throttle body comes in.
Throttle bodies are essentially air valves, and can take a number of forms. Most are butterfly valves, but barrel-type and pinch valves have also been used.
Prior to fuel injection, air delivery was modulated by a set of butterfly valves set into the base of an engine's carburetor.
Most engines use Multi-Point Fuel Injection (MFI.) In these systems, the throttle body is responsible only for modulating air delivery.
Many older engines use Throttle Body Injection (TBI.) These throttle bodies resemble carburetors, and utilize one or a pair of fuel injectors mounted atop the assembly, which shoot fuel through the butterfly valves and into the engine.
On most engines, the throttle body also contains a secondary circuit to control airflow at idle. This channel is called the IAC (Idle Air Control), and utilizes a computer-controlled valve to vary airflow.