Git repositories can be hosted remotely and various services are there to host Git repositories. In simple words, a Git project folder can be hosted online either publicly or privately.
Although one can setup his/her own Git server but it's easy and more popular to use an external dedicated hosting site like <ahref='https://github.com/'target='_blank'>GitHub</a>. Hosting Git repositories on such popular public hosting sites even makes it easier for the open source community to find the project and collaborate with it.