Does the fan power supply ground connect to the MOSFET source and Arduino ground.
Your "schematic" does not show the Arduino nor does it show any power supply(s). The MOSFET pins are not labeled. The MOSFET part number is not shown. The more complete and accurate the information that you supply, the better the assistance will be.
For a N channel MOSFET the + side of the fan connects to the + of the fan power supply. The - of the fan connects to the drain of the MOSFET and the Arduino ground. The gate connects to an Arduino pin set to OUTPUT. We don't know the type of the fan but it may need the flyback diode. Include it if not sure, it can't hurt.
The resistor are optional as is the cap. The 180Ω gate resistor limits the current to the gate when the MOSFET is turned on and the 10K resistor holds the MOSFET off while the Arduino pin is Hi-Z
during processor reset.
