The CPU heatsink fan will get it's power from the CPU FAN header. It'll be either a small 3 pin or 4 pin connector.
The video card GPU heatsink fan will get it's power from a connection on the video card somewhere. It's usually a small 2 pin connector but the replacement fan will probably come with a 4 pin molex power connector that will connect directly to one of the power supply 4 pin power connectors.

Cricket