Electrical devices all produce heat when operating. This heat is created by the electrical resistance of the materials from which the hardware is composed. As more electrical current is passed through a device, the temperature of the device increases. Likewise, if the current is removed the device will (in time) return to approximately the ambient temperature of its surroundings.
Common methods of temperature control on consumer and enterprise hardware include:
Air cooling: Where drafts of comparatively cool air are continuously blown across, through, or otherwise brought into physical contact with the device being cooled. Heat from the device is transferred to the cooler air and vented outside the device housing.
Water/liquid cooling: Less common than air cooling, liquid cooling is often found in high-end and enthusiast personal computers (and many super computers, but on a much larger scale.) Liquid cooling is far more effective at temperature reduction than air cooling, but is also more more difficult and expensive to implement. In contrast to air cooling, the liquid used in liquid cooling never comes into direct contact with the device. Heat absorbed by the liquid is radiated to the environment by a special radiator which may or may not be housed within the device chassis.
More exotic cooling techniques include phase change cooling or the use of liquid nitrogen or other chemicals with very low boiling points such as helium. In extreme examples, the device being cooled is immersed entirely within the cooling agent, though this is not recommended unless both the device and the cooling agent were designed for this purpose.