The final stage resistor controls the fan relay by measuring the amount of flow and temperature requested by the climate control unit. When not functioning properly the fan relay gets confused and won't know when to control the fan.
It is an easy replacement.
Part = $127.00 CDN at the dealer. I suggest buying new as a used one will simply fail that much faster.
The resistor is located just to the right of the accelerator (gas pedal) behind some wiring harnesses. I found difficult to see it at first, as it is very crowed under there.
Look at the back of the new one, then look for the same shape with the plug end.
Unplug and unscrew the existing and replace with new.
This is a sealed unit, so I wouldn't even attempt at trying to fix it.
1996 E36 M44 318i 5sp LSD