The heat is supplied externally to a closed loop with some of the heat added being converted to work and the waste heat being removed in a condenser.
What happens to waste heat in the Rankine cycle?
removed in a condenser