If I understand correctly, Git has two sorts of repositories: one called local, another called remote. My questions are extremely naive ones about the two types of repositor
Your quoted statement is correct.
You don't need to have a remote repository at all.
You can have the full git experience, with commits, branches, merges, rebases, etc, with only a local repository.
The purpose of a remote repository (eg, GitHub) is to publish your code to the world (or to some people) and allow them to read or write it.
The remote repository is only involved when you git push
your local commits to a remote repository, or when you git pull
someone else's commits from it.