totally depends on the type of furnace you have....
But in principle, the thermostat is a thermometer and an switch. When the temperature falls below the "set" temperature, the switch changes and sends a signal to your furnace. This signal will either light a pilot light, light a furnace grate, turn on burners, however your furnace heats. Once the "system" gets to a set temperature (there's usually another thermostat somewhere on the system), the blower will go on, the pump will start circulating the water, whatever your system is.
The thermostat that started all this will again send a signal when the temperature rises above the setting. This will turn off the blower, pump, grates, pilot light, whatever.
On the older dial thermostats, you only have an option of setting one temperature. On programmable ones, you can set numerous temperatures based on time, etc. such as lower for night, higher for day.
And, of course, the thermostat works the opposite way with air conditioning / cooling.