Controlling PWM fans with arduino and mains power

wvmarle:
You can set the PWM frequency that your pins put out. That 1 kHz is the default.

Ah, so I can simply set (I'm presuming in setup) for my PWM pins to output at 25kHz? Would this be able to then output 25kHz to 5 separate PWM pins or is that asking too much from a humble Uno?

wvmarle:
You'll also need a MOSFET to control the power to/from the fans, an n-channel, logic level type, such as the IRL540. You can't connect them to the Arduino pins directly.

Presumably this is literally to turn them on and off, and the PWM signal is then used to control their speed?
Also, forgive me, I am very new to electronics and still trying to wrap my head around all of this. Just so I understand correctly, MOSFET's have 3 pins. One is for power in, one for power out, and one which you feed a low level power to from the arduino which allows the higher level power to flow?