How does hot reloading work?

Hi can someone point materials or explain the magic behind hot reloading and how does it happen and work.