If you have a MGF or early MG TF it will be engine bay sensor mounted on bracket above coolant expansion bottle.
If you have later MG TF, inc SAIC then it will be a faulty water temp sensor back top left engine behind air filter. There are two. One feeds the Water Temp Gauge, and the other feeds the ECU. Its the ECU one you are after. Could be Brown or Black dependant on age of car. Blue one next to it is for Temp Gauge.
When sensor is open circuit / unplugged cooing fans come on with ignition, the engine bay one should cut out on timer (8 min?) after ignition off if I remember correctly.
Cheers, Mark