Let us say I have a liquid of mass $m$ at its boiling point and add heat to increase to cause turn it all into a vapour. Under what conditions will the heat I actually add be equal to: $$Q=ml$$ Where $l$ is the specific latent heat of vaporization of the liquid.
The equation $$Q=ml$$ Only holds in a system at constant pressure (isobaric) and constant temperature (isothermal) and generically it is not true.
This can be shown as follows:
If we look at the change in the internal energy (which is a state function) of the system: $$dU=dQ+dW$$ We see that for the above process we have: $$U=mL-p(V_2-V_1)$$ Where $V_1$ and $V_2$ are the initial and final volumes respectivly (with generally $V_2>V_1$)*. Now take a different process which has the same intial and final state but which does it in the following steps: 1. Free expansion to the final volume. 2. Isochoric (constant volume) vaporization of all of the liquid In this process no work is done but we still have the same change in internal energy (since it is a state function). In this case all that energy must come from the heat supplied and is thus simply not equal to $ml$ as one may naively expect. (i.e. for this process the heat added would be: $$\tilde Q=mL-p(V_2-V_1)$$ Which is actually less then that for the standard isobaric, isothermal phase change.