GitHub, Inc. is a United States-based global company that provides hosting
for software development version control using Git. In 2018, it became a
subsidiary of Microsoft for US$7.5 billion.
It offers the distributed version control and source code management
functionality of Git, plus its own features.
GitHub is a web-based Git or version control repository on the Internet with
a hosting service. It offers the distributed version control and source code
management (SCM) functionality of Git as well as adding its own new features.
Github is used to upload your code to back it up. You can also use the public code like you want, just make sure you respect the licence ;)