What you'll need:
An Arduino-compatible embedded microcontroller (I used the Kameduino and Chibiduino from Brown Dog Gadgets: http://www.browndoggadgets.com/store/arduinocompatible/) and the Arduino IDE from http://arduino.cc/en/Main/Software
A 6-12 volt wall wart, or a 9 volt battery
A DC case fan, 80mm or so, 5-12 volts
A TIP120 "Darlington" NPN transistor (available at your local components drawer)
Three resistors - 220 ohm and two 1000 ohm
A "matched set" of an IR emitter and IR phototransistor (I got mine from Sparkfun: http://www.sparkfun.com/products/241)
A box of baking soda, ideally the "fridge and freezer" kind with the ventilation panels on the side
Some "poster tack" sticky mounting putty
Some rubber bands
You'll need a soldering iron and some solder. A solderless breadboard is a great tool for prototyping circuits without making permanent connections. Let's get started.
Step 1: Prototype the Circuit
It helps to breadboard the circuit, first. A Fritzing mockup of the circuit is provided. If you bought your IR emitter and phototransistor from Sparkfun, then it may not be obvious which is which; try plugging them into 5 volt DC power (from your Arduino, perhaps) in series with the 1k resistor and viewing them through a digital camera (such as your cell phone.) While IR is invisible to the unaided human eye, digital cameras can see it quite handily particularly if they are poorly filtered (as most are.) The IR LED is the one that lights up with a purple color. The phototransistor will not light up at all. Remember that an LED works only in one direction; with the anode connected to power and the cathode to ground. Typically, the long lead is the anode.
In this setup, three pins of the Arduino are used. Pin 3 provides power to the LED. Pin 2, as an input, detectes the presence or absence of the IR beam. Pin 5 supplies current to the "base" of the TIP120, which allows current to flow from the "collector" to the "emitter" and activating the fan's motor. Resistors in series with the LED and TIP120 prevent too much current from flowing through the delicate microprocessor. The resistor and the phototransistor form a voltage divider which will input to the Arduino in the presence of IR light.