Git is a version control system to manage and keep track of the source code history.
GitHub is a cloud-based hosting service to manage Git repositories.
Assume github to be a git repository hosting service. If you have open-source projects that use Git, then GitHub is designed to help you better manage them.
A Git repository hosting service, wondering what it actually mean! Well it is an online database that allows you to keep track of git repository outside the local server/computer. Both git and github give programmers version controlling tools and functions to allow the smooth coding and building of projects. But yeah, getting deeper into the functionality of both, it is seem that github provides a much wider range of functions going ahead few steps than github. Unlike git, github is for-profit cloud based application that allows ope source contributors to work efficiently.
Other alternatives for github: GitLab, BitBucket, and SourceForge