In a reversible process, you can convert all of the heat energy entirely to work with no losses incurred in the process. The losses are prevented (in theory) by very carefully ensuring that with each step you take that you can go back and forth with the previous step as you gradually move forward (each step is reversible because you can "reverse" the process to the conditions of the previous step at each step as you go along). To attempt to get a qualitative understanding of how this works, imagine that you are standing atop a stairway, and I hand you a glass filled to the brim with water such that if you make the slightest *Ignore me, I am impatient* the water will spill out of the glass. I then instruct you to walk down the stairs without spilling a drop. Further suppose that evaporation or condensation of water from the atmosphere cannot take place and can't skew the results of the experiment. The goal is to reach the bottom of the staircase with exactly the same amount of water as you started with. Can you accomplish it?
Well, you might imagine that if you moved very slowly and carefully down the steps that you might be able to prevent even the slightest amount of water from spilling out of the glass. Furthermore, as you move down the stairway without spilling a drop you can always go back to the previous step up, and the glass will contain the same amount of water as it had before you had moved down to the lower step. In other words, so long as you don't spill ANY of the water at any point on the stairs, then the process will be reversible all the way down the steps. At the bottom of the stairway the amount of water would be the same as it would be if we measured the amount on top. Hence, we can say that this amount of water represents the maximum amount of water you can have at the bottom of the staircase regardless of what steps or tricks you used to get the glass down the staircase without spilling.
On the other hand, suppose you tried this in actual practice and somewhere in the process you spilled a drop out of the glass at any point. The moment this happened, you would find that you cannot go back up to the previous step with the same amount of water as you had before. Furthermore, even if you are perfect the rest of the way down the stairs, you are from that point forward doomed to have less water at the end than what you started with. In other words, the loss of a single drop of water was an *irreversible* change. Once you lose any water you can't get it back, and the overall process will leave you with less water at the end than what you started with. As you can imagine you can have many drops spill out as you go down the stairs depending on how the person carries out the task, so the amount of water any one person can have at the bottom of the stairway varies depending on what happens as they carry down the glass. Furthermore, you might suppose that it is much more likely that someone will spill a drop at some point while trying this making the irreversible process much more likely to take place than the reversible one. In fact, you might find that in practice the reversible process never actually takes place as some loss seems to take place regardless of how hard the person tries to keep it from spilling.
In reality, we are talking about energy instead of water in thermodynamics. We can convert energy from heat to macroscopic work without loss if we use a theoretical reversible engine that can carry out the process without losing anything to the environment. In reality, we lose heat to the environment as the process takes place and in doing so we always end up with less work coming out than the energy we put in to begin with from the heat. Just how much work we get out depends on how much we lose, which depends on how the process is carried out.
Of course, it must be emphasized that a mathematical treatment is strongly proffered to holistic approaches such as this if you want a more detailed and accurate understanding of entropy. I recommend starting with H.C. Van Ness, "Understanding Thermodynamics" for a good balance between the two approaches.