As you recall, the First Law of Thermodynamics is based on conservation of energy. The energy that a system exchanges with its surroundings, i.e. heat flow and work, must be offset by a change in internal energy in the system. Conversely, the internal energy of a system has changed, the amount of change must be complete accountable in terms of heat flow and work.
Okay, now it is time for a big transition in the main sequence. We are moving to the Second Law of Thermodynamics, a 'deeper' law. Our study will be asking why some thermodynamic changes are more likely to occur than others. Through a cyclic process, work can be converted completely into heat, but it is impossible for a thermodynamic cycle to convert an amount of heat flow completely into work without changing the surroundings. Why is the evolution of heat by the system favored?
We will learn that in a thermodynamic process involving the conversion of heat into work, some heat must be released at the cold sink. Otherwise, the entropy of the universe would decrease with each cycle. The universe would be winding up instead of winding down, but this doesn't happen. The universe winds down. In other words, entropy is a function that always increases in the physical world.
There are many ways to express the second law. All basically say that overall change produces disorder because disorder is the more probable state of things. Therefore, increasing disorder is a component of every spontaneous, real energy conversion.