One copy of the repo sits on your computer and another on GitHub. You make a change on your computer and commit it, then send it to GitHub, and the two copies match again. In git, the GitHub copy is usually called origin.
If the repo is public, anyone who opens the link can see the code and its history. A private repo is visible only to you and the people you add, and a link you share opens an error page for everyone else.
You open Claude Code in the repo's folder and the agent works with the files in that folder. CLAUDE.md belongs at the root of the same folder. The free 2-hour program starts with creating a repo in your own account from the template.