Is it an aftermarket fan? The OEM S14 fan is controlled by the ECU. What 240sx chassis, S13 or 14?
If S14, there is a fuse and a pair of relays to check.
First is a 7.5A fuse on drivers side floorboard. Its labeled AC I believe. Neither slow or high speed fan will come on with that fuse blown or missing.
There are 2 relays in fusebox under the hood for high and low fan speed.
Short answer. Its controlled by ecu. Long answer depends on your chassis and ecu ,(stock, aftermarket) on where to start troubleshooting.