lazy loading is bydefailt enabled in EF.
how does it work?
when you generate entity then you get navigation properties as well , if you closely observe all navigation property are marked as virtual.
If you have ever worked with Polymorphism then you would know that virtual is used to achieve run time polymorphism means we can change the behavior at run time by simply overriding the method.
In Linq all navigation property overrides at run time and call the related data using context at run time as soon as we call any property of related class , inside a foreach or simply using a dot.
 
When do we use it?
Never. If you are developing a web app then never, it creates N+1 issue means to load 1 entity and their related enetity,  n+1  requests goes to the server to fetch the related data, it slows down the performance.
If you are developing desktop app then requests doesn't matter because both database and app are in same machine so number of requests doesn't matter then you can use lazy loading.
If you have to really really load related data on demand which doesn't send too many request then too you can use lazy loading.
https://www.sharpencode.com/article/Linq/loading-related-objects/lazy-loading