Fan and Digital Input

I see... Thank you very much!

I've googled transistors a bit... From what I've got, when the pin connected to it is HIGH, the transistor lets the power supply through it to the motor? And with PWM pins, the higher the output, the more voltage it lets through? (There's a big chance I got it wrong.)

Also, the motor actually works with 4.5V (I was using 5V for a matter of convenience, as it's proven to work fine with that voltage as well. I suppose I was doing wrong?), drawing 225 mA.