What GitHub is
GitHub is a cloud platform built around Git repositories. It provides a place to store source code remotely and adds collaboration features such as pull requests, issues, code review, discussions, project management, releases and automation.
Git and GitHub are not the same thing
Git is the version control system that records commits, branches and history. GitHub is a hosting and collaboration platform that works with Git. You can use Git locally without GitHub, while GitHub repositories are normally managed using Git.
Why developers use GitHub
A GitHub repository gives a team a shared location for source code and project history. Developers can work locally, push branches, open pull requests, review changes and merge approved work without directly editing the shared branch.