you would use a transistor (bipolar or mosfet) to control the fan. There are designs that will allow you to feed the full 12 volts. You could use PWM to control fan speed. The third wire is used to dertermin fan RPM. It "ticks" when the fan revolves. Count the ticks... know the fan speed.
I just took apart the breadboarded circuit I had that interfaced to a PC fan. I used a TIP120 darlington transistor and a few other components. It worked pretty well, but it was noisy because the 490Hz PWM signal seemed to kind of turn the fan into a speaker at low speeds. An RC filter on the PWM pin output helped, but there is probably a better way.
The problem with PWM for a motor is that the manufacturers don't recommend you do this for maximum reliability. They suggest a changing DC level. This circuit takes the PWM and smooths it to be a DC voltage. Due to the high impedances you only need small capacitors. Scott's schematic will not smooth the PWM signal due to the high gain of the darlington used.