You can opto-isolators for high voltage, transistors for lower voltage and medium current, mosfets for higher voltages and higher currents, relays for high currents and high voltages. I'm sure there are more that I can't think of right now. I would just use a PNP transistor to switch the fan on and off. You will lose about 0.6v across the transistor though. If this is not acceptable then use a relay. This allows 100% of the source voltage to be appied to the load.