A CNAME record (Canonical Name) creates an alias from one domain to another.
blog.example.com. 3600 IN CNAME example.github.io.
When you query blog.example.com, DNS follows the CNAME to example.github.io, then resolves that to an IP.
CNAMEs are useful when you host services elsewhere. Point your subdomain at their domain. If they change IPs, you don't need to update anything.