First, some straightforward, textbook stuff which talks about the Carnot Cycle. This is the cycle of processes by which heat can be turned into work with maximal efficiency. Even these most efficient, idealised, frictionless machines, operating on the Carnot cycle, will have their efficiency limited by the second law.
In this post, all I have done is to annotate and expand on the excellent notes of Prof W Salzman. He gives by far the clearest explanation of what was to me a mystery: the fact that, in a gas at equilibrium (ie uniform temperature), there are few low-speed particles, very few high-speed particles but huge numbers of particles with intermediate speeds. I hope the notes I’ve made here are useful to you. This is the first of 2 posts on this specific topic.