This cable was originally created for workstations to provide 12 volts to power multiple CPUs. But as time has passed many CPUs require more 12 volt power and the 8 pin 12 volt cable is often used instead of a 4 pin 12 volt cable. Depending on the power supply, the connector may contain one 12 volt rail in all 8 pins or two 12 volt rails taking up 4 pins apiece. It is often refered to as an "EPS12V" cable.
Older computers put most of their load on 3.3 and 5 volts. As time passed, computers drew more and more of their load from 12 volts (see here). Before this power cable was introduced there was just one 12 volt line provided to the motherboard. This cable added two more 12 volt lines so more of the load could be shifted to 12 volts. The power coming from this connector is usually used to power the CPU but some motherboards use it for other things as well. The presense of this connector on a motherboard means it's an ATX12V motherboard. For dual 12 volt rail power supplies, this connector provides the voltage refered to as 12V2. The power cable which plugs into the 4 pin connector has two black wires and two yellow wires. This cable is sometimes called an "ATX12V" cable or "P4" cable although neither of those are technically accurate descriptions.
If you have one of these connectors on a motherboard then you must plug a power cable into it or your CPU won't get any power. The one exception is that when this connector was new, some motherboards shipped with a socket into which you could plug a 4 pin peripheral power cable as an alternative. That helped people who had older power supplies which didn't have the 4 pin 12 volt cable.