Git is a distributed version control system that was created by Linus Torvalds in 2005 to manage changes to files over time. It works by tracking changes made to files in a git repository and allowing users to commit snapshots of changes. The key git commands are git init to create a new repository, git clone to copy an existing one, git add to stage changes, git commit to commit staged changes, and git log to view the commit history. GitHub is a popular web-based hosting service for git repositories.