The thermostat's main job is to allow the engine to heat up quickly, and then to keep the engine at a constant temperature. It does this by regulating the amount of water that goes through the radiator. At low temperatures, the outlet to the radiator is completely blocked -- all of the coolant is recirculated back through the engine.
Once the temperature of the coolant rises to between 180 and 195 F (82 - 91 C), the thermostat starts to open, allowing fluid to flow through the radiator. By the time the coolant reaches 200 to 218 F (93 - 103 C), the thermostat is open all the way.
The open and closed positions of a thermostat
If you ever have the chance to test one, a thermostat is an amazing thing to watch because what it does seems impossible. You can put one in a pot of boiling water on the stove. As it heats up, its valve opens about an inch, apparently by magic! If you'd like to try this yourself, go to a car parts store and buy one for a couple of bucks.
The secret of the thermostat lies in the small cylinder located on the engine-side of the device. This cylinder is filled with a wax that begins to melt at around 180 F (different thermostats open at different temperatures, but 180 F is a common one). A rod connected to the valve presses into this wax. When the wax melts, it expands significantly, pushing the rod out of the cylinder and opening the valve. If you have read How Thermometers Work and done the experiment with the bottle and the straw, you have seen this process in action -- the wax just expands a good bit more because it is changing from a solid to a liquid in addition to expanding from the heat.
This same technique is used in automatic openers for greenhouse vents and skylights. See this page for an example. In these devices, the wax melts at a lower temperature.