Graphical representation of the Kelvin formulation of the 2nd law of thermodynamics
It is impossible to convert the heat from a single source into work without any other effect.
The 1st law of thermodynamics is based on conservation of energy. The energy that a system exchanges with its surroundings, i.e. heat flow and pressure-volume 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 accountable in terms of heat flow and work.

We understand the 1st law. New we are ready to move on to the 2nd law. The question we want to ask is why some thermodynamic changes are more likely to occur than others. Through a cyclic process, work can be converted completely into heat flow, 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 into the cold sink. Otherwise, the entropy of the universe would decrease with each cycle. The universe would be winding up instead of winding down. 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.