Git is a version control system that allows users to track changes to files over time. It works by taking snapshots of files that are committed, with each commit having a unique hash ID. GitHub is a hosting service for git repositories that provides additional collaboration features on top of git. It allows users to host projects online and collaborate with others through features like pull requests.