How to drive 3 wire fan (PC fan) with AVR micro-controller?
Since you did not identify the fan in question, we will assume that it is a typical 3-wire example.  One wire (typically black) is circuit ground. One wire (typically red) is the +12V power to the motor, and the third wire (perhaps yellow?) is likely the tachometer feedback from the fan.  Your controller can monitor the speed of the fan using the pulses from the tachometer feedback signal from the fan.  And your controller can change the speed of the fan by pulse-width modulating the power it is sending into the fan.