Early research on improving efficiency of heat engines led to the three laws of thermodynamics that govern heat and thermal physics.
Early in the industrial revolution, engineers tried to improve the efficiency of heat engines, which are any engines using some form of heat to do useful work. Fundamental research into general principles governing the efficiency of heat engines led to the branch of physics known as thermodynamics.
Thermodynamics is the study of heat and thermal energy. There are three laws of thermodynamics and a more basic zeroth law.
When two objects or systems are in thermal equilibrium with each other, the heat energy flowing from the first object to the second is the same as that flowing from the second object to the first. Hence they are at the same temperature.
The zeroth law simply states that if two objects, objects a and b, are both in thermal equilibrium with object c, then objects a and b are in thermal equilibrium with each other. This law is analogous to the basic rule in algebra that if a=c and b=c, then a=b.
The first law of thermodynamics is the law of conservation of energy applied to work and heat engines. A heat engine or any other system will have some energy input. There will also be energy output in the forms of both useful work and waste heat. This law states that the energy input for a system equals the total energy output, which is the sum of the useful work and the waste heat energy.
From the law of conservation of energy, even if there is no waste heat, the total useful work from a heat engine cannot exceed the energy input. Colloquially, you can't get more out than you put in.
The first law allows the possibility of a heat engine or other system in which the useful work output equals the energy input. In this case, the engine is 100% efficient. The second law of thermodynamics states that the efficiency of any engine or process must always be less than 100%. There will always be some waste heat.
The second law also deals with the concept of entropy. Entropy is the measure of the randomness or disorder of a system. A more random or disordered system will have a higher entropy. Heat is a random form of energy, so adding heat energy to a system will increase its entropy. The second law states that any process will generate some waste heat energy. This heat energy is random and increases the entropy (or disorder) of a system.
Hence an alternate form of the second law of thermodynamics states that any process in a closed system will increase the entropy of the closed system. If a system is not closed, any process will increase the total entropy of the universe. The entropy of the universe can never decrease.
Absolute zero (about -273 C) is the lowest possible temperature. It is the temperature of minimum random molecular motions. The third law of thermodynamics states that it is not possible to reach a temperature of absolute zero.
A loophole in the second law allows 100% efficiency if absolute zero can be reached, but the third law closes this loophole.
These laws can be irreverently summarized as follows:
They can also be summarized in one word: TANSTAAFL. There Ain't No Such Thing As A Free Lunch.
Feynman, Leighton, & Sands, The Feynman Lectures on Physics vol. I, Addison Wesley, 1963.