The mercury bimetallic thermostat is a good example with which to start in describing how an analog thermostat works.
There are three major elements to a non-digital or analog thermostat:
Bimetallic Strip / Coil
In order for a non-digital thermostat to work, something has to move as temperature increases or decreases. That's the job of the bimetallic strip. "Bimetallic" is just a fancy name for two pieces of metal joined together. But the trick in making it work is that the two metals expand at different rates at a given temperature (known as coefficient of expansion). So as one side expands more than the other side, the metal curves one way or the other. You then couple this little bit of physics knowledge with the exact rates of expansion for the two metals and you have a precise instrument that will move a specific amount at a given temperature.
The contact is another key part of the thermostat necessary for it to work. Think of the contact like a switch for your lights. As the bimetallic strip moves, it either opens or closes the contact. In the case of a mercury thermostat like the Honeywell T87 shown above, the mercury serves as a sealed switch. The mercury is placed inside a sealed glass vial called an "ampoule."
The ampoule is attached to a coiled bimetallic strip and as the coil moves, it tips the vial of mercury until the mercury moves and the switch contact is opened or closed.
The heat anticipator is an electrical resistance wire mounted on a center disc connected to the bimetallic strip and is adjustable to allow fine tuning of when the thermostat turns the furnace burner on and off.
Modes / Programming
The mechanical contact thermostat has modes for heating and cooling and fan positions for on/off and automatic. The thermostat is not programmable.