Entropy and heat engines

I'm having trouble trying to get my head around the role entropy plays in a heat engine. When the energy from a hot reservoir enters the engine, it brings a certain amount of entropy with it. Then, the "waste heat" (which is energy) gets rid of the entropy. But, why does it take less energy to get rid of the entropy than it does to bring it in?

Heat engines obviously need a source and sink. The source being the hot reservoir , and the sink being the cold reserviour(ambient air). The second law of thermodynamics says that the direction of temperature flow/transfer is one way (unless work is supplied) so with heat engines you are going from the hot reservior to the cold reservior. When you go from a hot body to a cold body, entropy decreases in the hot body, that is the level of molecular disorder in the heat engine decreases. (because heat is released to the ambient air)

So, in order to bring entropy into the heat engine you would have to reverse the process of heat flow which would require some type of work input, which means more entropy will needed to be generated..

Most of the entropy generated in actual heat engines is caused by friction and vibration.

thanks for the clarification...I think the thing that was confusing me most was the idea that the engine itself (or the gas inside, I guess) has to change temperature for the part of the cycle where heat is being expelled. I'm a little clearer now....I think.