A thermistor is a resistive element that changes its resistance with temperature. They are small and cheap, but can be very nonlinear. The two curves below show how they might behave.