Hot Hot Heat
In the early days of computer processors, heat was not a vital issue. Early, simpler processors had smaller numbers of 'wires'. The technology wasn't there to put massive numbers of 'wires' on a single processors. However, even in these earlier processors, electricity was still moving through some sort of conductive material. Since these materials were not superconductors, they inherently had some amount of natural resistance. When electrical currents went through these wires, the semi-conducting material has a resistance. This resistance converts some of the electrical energy into heat, which is something that must be monitored.
In today's modern computers, there are so many transistors (made of semiconducting material, used to switch electronic signals), that the collective resistance actually create a sizable amount of heat. To help keep these processors running at there best efficiency, it is necessary to keep them cool. They way that is done today is to place a heat-sink on top of the processor chip.
The heat sink is basically a piece of metal with high heat capacity, that is designed to have a maximized surface area. Usually, these heat sinks are of a design where multiple metal 'fins' are attached the metal base (see image). This heat sink has a rather high heat capacity, and is in contact with the processor, usually through a thermal conductive paste or "thermal grease". This thermal grease is used to make sure the contact between the heat generating processor and its heat-sink is free of air voids. The cooler heat-sink and the hotter processor eventually reach a thermal equilibrium. To help maintain this thermal equilibrium, the fan is used to wick away heat from the heat sink, thus cooling the metal, helping the heat sink wick away heat from the processor.
Image B: A diagram of how a heat sink is placed on a processor.
Some computer users even 'overclock' their processors, basically running it at a faster speed than it was design for. When doing this, processors give off even more heat. Sometimes just a heat-sink and CPU fan is not enough to keep the processor at a relatively cool temperature. In these cases, liquid cooling may be uses. Liquid cooling operates on the same basis of heat transferring from the CPU to a cooling device. In this case, that cooling device is a tube of liquid. The tube of liquid is routed around the inside of a computer so that it contacts sources of heat, such as the heat-sink on the processor, the liquid is then routed to the edge, or out of the computers enclosure where heat from the liquid is transferred to the surrounding environment (air).
Image C: A diagram of how a liquid cooling setup.