how to create a website offline?

Hi, How do i work on a website "offline" on a local file? Is there a good resources i can follow step by step? I usually make a site live and then slowly work on it.