Git is a source code repository system. You can create git repositories for directories in your local filesystem. Generally, if you have multiple software development projects or things like that, you would create a git repository for each project and commit changes to the repository periodically to maintain a change history and rollback/recovery mechanism for that project.
Git repositories can be linked to other git repositories, effectively mirroring them. This is useful because you can push your local repository changes to the remote repository and - we hope! that the remote repository will be backed up on a regular basis. That way if your local hard drive fails, you can pull copies from the remote repository.
Another thing that you can do is share the remote repository with others if you are doing a joint project or want to pass a project on to a new maintainer. Git also has a branching mechanism where people can share a repo, but make changes to a branch of the project and only merge those changes into the main project if/when the branch is considered production-worthy. Unlike older repository systems, you don't have to "check out" files to change them, and therefore the repository doesn't need an administrator to resolve problems when something gets checked out and someone else needs it. Like the Subversion repository system, git changes commit atomically - all changes in the commit will be accepted or none will, which eliminates a problem that older repository systems often had where a commit would fail halfway through with some changes accepted and other changes lost.
Git also is convenient in that since you are operating first on a local copy of the repository, you can commit changes even if you have no Internet access. Say, if your name is Linus Torvalds and you've gone on a road trip but you want to make a few improvements to Linux before you get back.
GitHub is a web application. It acts as a web-based container for remote git repositories, and it allows organizing collections of repositories unto groups with individual owners. The webapp allows online browsing of the projects and it will display markdown-formatted files with the formatting applied. In particular, if you add a README.md to the root of your git rep, it will display on the project's home page.
GitHub also allows making selected projects public - visible to anyone, not just authorized users of the project. In this capacity it has become pretty much the de facto standard home for open-source projects these days. There are other amenities to help in development and support of software projects as well.
While GitHub is the "Amazon.com" of online source code repos, there are others, and in fact there is GitHub-like software that you can host yourself. I have one such server based on the gogs server application, which I host from a Docker container on a local server.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.