Git is a version control system that allows tracking changes to code over time. It works by initializing a repository on a folder, tracking file changes as they are modified, staged, and committed. Git allows cloning repositories to work locally, branching to work on different versions, merging changes, and viewing commit history. Key commands include git init to create a repo, git add to stage files, git commit to save changes, and git branch/checkout to work on different branches.