Domain name refers to a hostname -- for example, www.example.com and www.mysite.com are different domain names. Each domain name represents a numeric IP address on the Internet. DNS helps in mapping a domain name with its respective IP address on the Internet.
Sub-domain is a part of the parent domain for example, secure.mysite.com or blogs.mysite.com will be considered as sub-domains for mysite.com. Sub-domains have their individually qualified hostnames.
Google Analytics uses first party cookies and thus under the default configuration Google Analytics can't track across sub-domains or across distinct domains. You will need to configure Google Analytics such that the cookie information will be transferred from one domain to another.
Here is why you may want to use multiple domain tracking: