1993 Nissan altima what does the engine coolant temp sensor do?

I believe it turns on and off the fan (1 out of 2) that cools the engine according to the temperature it's at. If it doesn't work the engine may not know to turn the fan on and the engine could overheat. Here's a tip. When you turn on your A/C or Heater, both fans come on. The A/C cooling fan and the Engine Cooling fan.