Git is a tool that runs on your computer. It tracks changes to files in a folder (called a repository).
GitHub is a platform (a website) that hosts Git repositories online, making it easy to share code, collaborate, and back up your work.
Git works without GitHub, but GitHub needs Git.