There are three types of fan connectors.
1) A 4 pin molex is the larger. It will connect to the psu, and you can attach as many as you want. There is no speed control, the fan always runs at max speed.
2) Another type is a three pin conector which is smaller with a notch in it.
These connectors are designed to attach to the motherboard. The third/yellow lead is a speed sensor so the motherboard knows when to adjust the speed.
You can control the speed of these fans with the bios, or a program like speedfan.
If a fan comes with both, you have a choice of using either connector.
3) The last is a 4 pin pwm cpu fan connector. PWM(pulse Width Modulation) controls the fan speed by turning the current on and off rapidly. The three pin speed control works by reducing the voltage to the fan from 12v to something less. A pc will not run without a fan connected to the cpu fan connector.
The fan itself may have 3 or 4 connections. It is the size of the three pin type above. If you have a 4 pin pwm fan and only a three pin mobo cpu fan connector, then you can still plug in the fan, but it will just run at max speed.