Latent heat at the molecular level: How does it work