The Second Law of Thermodynamics describes the limitations of heat transfer. Most importantly, it sets out the specific idea that heat cannot be converted entirely to mechanical energy. This important idea can be stated in numerous ways, but there are 3 that will be discussed in detail. These are:
The Waste Heat statement, formally known as the "Kelvin-Planck statement" is as follows:
This is a statement of the thermal efficiency in heat transfer, given by the equation in Figure 2.
This statement is important to understand in terms of practicality of heat engines. Waste heat is necessary for all engines, and the amount of work that is done by the input of heat gives the thermal efficiency of a system. Using an analysis of heat and work on an ideal engine, the maximum amount of work that can be achieved by a thermodynamic exchange between two specific temperatures is given by the Carnot efficiency. Although the Carnot efficiency can never be reached in reality, it is useful to compare to when looking at thermal efficiency of an engine.
For a more detailed study of this version of the second law please see the hyperphysics page on the second law: heat engines.
Also known as the "Clausius statement", this is fundamental to how a refrigeration system works:
This is known as the Clausius statement, and explains why an ice cube will melt when placed in a bowl of hot water but ice will not form from water outside on a hot day. Everyday experience certainly supports this statement, but it is a deep physical concept limiting what's possible with energy.
The second law of thermodynamics claims that it is impossible for heat to spontaneously flow from a cold body to a hot body, but it can move in that way if some form of work is done. This is how the refrigeration process works, and an example can be seen in Figure 1. Refrigerators work by transferring heat from the cold regions inside of the device to hot regions outside of it, thereby making the cold regions even cooler. This is how refrigerators work to keep food inside of them cool, and why they can be felt blowing hot air out of their vents.
The right part of the image in Figure 2 and 3 describe the impossible scenarios that the second law forbids, so a perfect refrigerator is analogous to a system's heat transfer operating at 100% efficiency.
In Figure 3, the refrigerator takes some heat from the cold reservoir, , does some work on it, , and rejects some heat to the hot reservoir. Therefore the net effect of the refrigerator is to make the cold reservoir colder by removing heat from it and moving that heat to the hot reservoir. Due to this, a refrigerator is essentially a heat engine that runs in reverse. By analyzing how well a refrigerator can cool the cold reservoir, refrigerators carry with them a coefficient of performance.
This statement is nicely captured in the humorous song 'The First and Second Laws of Thermodynamics' by Flanders and Swann. For a more rigorous (but not as funny) write up of the refrigeration statement of the second law please see the hyperphysics Second Law:refrigerator page.
It is important to emphasize that this statement refers to a "closed system", meaning that there are no external influences on the system. This is due to the fact that an open system can have its entropy decreased, as this ability to decrease the entropy is how refrigerators work! Or for that matter, the Earth is an open system because the of solar energy to the Earth contributes to the Earth's energy flows.
Entropy is essentially a measure of "disorder", so the higher the entropy, the more disorder the system has. This can be seen when shaking bricks in a can: the bricks are more likely to form a loose pile than to turn into a house. See the hyperphysics page on entropy for a more detailed discussion.
Associated with entropy is the idea of "energy quality". Heat is a low-quality energy, whereas mechanical energy is a high-quality energy. Seen in Figure 4, the energy quality decreases as entropy increases. Therefore in general, since entropy naturally increases, energy quality will deteriorate. The association between an increase in entropy and a decrease in energy quality explains why all of the energy in fuels cannot be converted into mechanical energy. It is possible to burn fuel, therefore directly converting all its energy to low-quality heat, but this low-quality heat cannot then be turned fully into high-quality mechanical energy or electricity.
For a more detailed description of the entropy statement of the second law of thermodynamics please see the hyperphysics page on the second law: entropy.