Cool down with a thermistor!
A thermistor is a resistor whose resistance changes with temperature.
When it becomes cold its resistance gets bigger. When it becomes hot its resistance becomes smaller.
Check the voltages across the voltage divider.
The mosfet acts like a switch. When the voltage at its gate becomes bigger than 2 volts it will switch on the relay which in turn switches the fan on.
16Feb