Adding to John's answer: Maybe we can make an analogy:
A website needs a place to stay. A website is like a mobile home that can park on any particular piece of real estate. Website hosts like Hostgator provide the real estate where you can build your website.
The real estate has an address. That is the IP address. Your website host most likely has many websites sharing the same address, like an apartment building. However, for a little extra fee you can ask your website host to give you your own address, or dedicated IP.
Your website needs a unique name that no other website has. That is the domain. In order to keep the name unique, every domain must be registered. When you buy a domain name, you also register your domain. Whois, GoDaddy, Namecheap, etc. are examples of domain registration services. Once your domain name is registered with the registrar, nobody else can have that domain name. It's like nobody else in the world can have the exact same phone number, including country code, that you have.
Once you have a domain name, you want to attach it to your website. Your domain name sits at the place where you bought and registered it. In order to attach your domain to your website, you need to point your domain to your website, which is located on the real estate managed by your website host. Technically, you should be able to just point the domain to your IP address, and that should attach the domain to your website. However, to make things easier, your website hosting company has a name for you to point to. Usually it will be two names NS1.WEBSITEHOST.COM and NS2.WEBSITEHOST.COM, where NS1 and NS2 are nameservers. So the nameservers attach your domain name to your website.
You can build a website at your website host whenever you want. You don't need a domain. However, without the domain, nobody will ever be able to see your website. It's like having a mobile home someplace, but you don't live there. Once you have attached your domain name to your website via nameservers, your website is visible to the public. Like, once you move into your mobile home, people know where to find you.
Hope this has not been too confusing.