Using 1N4148 As A Temperature Sensor
D1 is a temperature sensor. Voltage drop developed over a diode will drift with the temperature. Usually silicon diodes have a negative temperature coefficient of -2mV/C.

R5 and Z1 make a 10V voltage regulator. As the temperature increases, voltage drop over diode D1 will decrease making voltage at the "+" input less than voltage at the "-" input, opamp will drive it's output low turning on the fan.

R3 accounts for varying current - when voltage drop over diode decreases, more current will flow thru it. By connecting diode and pot to common point at R3 designers make sure that this does not affect the temperature point set by a potentiometer.

R4 provides hysteresis - it affects the voltage at "-" input a bit so that the output will not oscillate at the specified temperature.