In analyzing the thermal efficiency of a system, thermal energy can be lost according to the second law of thermodynamics primarily in the following way:
Energy is released as waste heat into the surroundings.
This reflects the concept that not all energy input can be converted into useful work, and some energy inevitably increases the entropy of the surroundings, typically manifesting as waste heat. The second law of thermodynamics indicates that energy transformations are not 100% efficient, and a portion of energy will always be lost in the form of heat, thus reducing the overall thermal efficiency of the system.