OpenStreetMap is a map ecosystem based on an open data set. There are numerous redundant ways of achieving the same thing with this data, whether it's hosting the "tiles" (the thing you see on the map), search, UI, location bookmarking, navigation, etc. This is great for flexibility, but it's a difficult thing to dive into and understand.
With that said, the "tile hosting" part is notoriously difficult to actually self-host. It's a lot of data, it traditionally took a lot of time to transform the raw data into the png files representing the tiles. Many if not most web apps actually call out to openstreetmap.org or similar to do the tiles for them. That's not fully self-hosting. But more recently, there have been new ways to do tiles, namely with vector formats instead of pngs. They take up less space, they're easier to share around.
So this submission appears to be a simple few lines to get your fully self-hosted tile server of the whole planet up and running. You should then be able to use this in whatever web app you're making to make it fully self hosted (though if you wanted self-hosted search, that's another hard one...).