The thermal efficiency of a heat engine is a measure of performance that is done by taking the ratio of the amount of energy outputted to the amount of thermal energy inputted from a source, typically expressed as a percentage. For example, if you put 1000 Joules of energy in through fuel, but only get 500 Joules of energy out, then your thermal efficiency is 50 percent.
Heat engines transform any inputted thermal energy into mechanical power, but the process is not entirely perfect; some of the thermal energy is outputted to the environment as waste heat, and some of it is lost through the mechanical friction in the engine itself. The best heat engines are about 50 percent efficient, which means that most of the thermal energy inputted eventually becomes a waste of resources.
Even in an ideal, frictionless engine, the second law of thermodynamics places limits on the maximum efficiency of an engine. This efficiency is known as the Carnot efficiency, which can be calculated by first determining the ratio of the absolute temperature of the environment the heat engine exhausts as waste heat, Tc, and the absolute temperature which heat enters the engine, Th, and subtracting that ratio from 1.