Fan and Digital Input

It looks like your moter is not connected to any of the I/O pins. Connect one leg of the motor to Pin 3 and the other to ground, designate pin 3 as output You might designate pin 4 as input then connect your switch between +5 V and pin 4... then make the code in your loop turn on pin 3 when you turn on pin 4 by pressing the switch.

This will be a much more complicated way of doing just what you are now, but at least it will be under program control and you will have written your firt program! You should be able to get some good ideas from looking at the examples that come with the IDE.