FAQs: Difference between Domain and Subdomain
A domain is your main web address, such as mywebsite.com. A subdomain is a part that sits in front of a main domain.

For example, in mywebsite.onlinecoursehost.com, mywebsite is the subdomain and onlinecoursehost.com is the main (parent) domain.
A subdomain works like a domain. The only difference is that it depends on its parent domain.