Some heat detectors trigger only as a result of a rapid rise in temperature. They contain a thermometer that triggers an alarm in reaction to a rapid rise in temperature.
Fixed temperature detectors react when the air around them reaches a certain temperature (they are usually set to 135 degrees F). They contain a thermometer that triggers the alarm when it reaches that temperature.
Many detectors contain a small piece of metal that changes in size in response to air temperature. Higher temperatures cause it to extend, eventually bringing it into contact with another piece of metal completing a circuit and triggering the alarm.
Many detectors contain both rate of rise and fixed temperature sensors to increase their chances of accurately and quickly responding to a fire.
Some modern detectors contain small electronic sensors which measure the air temperature and trigger a system when it reaches a certain point.