Where the power cord connects to the back of the PC is the power supply. The power supply converts AC current from the wall outlet to the appropriate DC voltages for the various components of the computer.
The power supply has a fan built into it to keep itself and the PC cool. Most PC's have at least one additional cooling fan, often mounted directly on the CPU. The power supply or its internal fan can wear out. Fortunately,when this happens in most cases, the entire unit is easily replaced.