You may have heard of static sites before, and you may be under the impression that they are somehow outdated—anachronisms, relics. Maybe you have personal experience with such sites, or perhaps you have technical contacts who view them with disdain. Such attitudes may be warranted in the case of static sites that have been created by coding one page at a time, without templates or global mechanisms of any sort, so that adding a page means updating the menu on every other page, in code, one by one. This can undoubtedly turn into a nightmare of inconsistency and laborious updates. This is the old way, though. The very old way.
Modern static sites are created using a static site generator, of which there are many. A static site generator is software (usually locally installed) that generates a website by feeding simple text files and images to templates and outputting HTML files, which are the kinds of files browsers display. The HTML files output by the generator are then placed on a web server that serves them up to the world. Note that only the output of the generator is moved to a publicly accessible location, not the source code, which remains in a secure location accessible only to the developer. The source code is thus immune from any hacking whatsoever. When a static site’s content needs to be changed, fresh HTML files are generated and the files previously on the web server are replaced.