Git is the version control tool: it runs locally and tracks every change as commits, branches and merges, with no server needed.
GitHub is a hosting platform for Git repositories, adding pull requests, code review, issues, Actions CI/CD and access control on top. GitLab and Bitbucket are alternatives.
Why it matters for security: anything ever committed stays in Git history, so a pushed secret must be rotated, not just deleted. Protect the main branch, require reviews, and treat CI workflows as code that can be attacked.