Git is an open source software which is used for version control by Developers.
To make it simpler to understand, think of it as a time machine for code, you can revert back to a specific version of code at any time and make different branches to code on different features and in different teams.

Repository is simply a folder which has .git file in it. .git file is used to define the states of file in the directory you’re working in. For now, we don’t need to get into the details.
All the files in a git repo have one of these three states: modified, staged and committed