The relationship between the domain registrar, name servers and hosting company all relate to getting your website on the Internet.
The domain registrar is a company where you purchase a domain name.
A name server is part of the DNS (Domain Name Service) that stores a record that tells web browsers where to look for your website.
A website hosting company stores the actually files that make up your website.
To give an example, someone wants to view your website. So, they type your domain name into their web browser. The web browser asks the name servers for the top level domain like .COM to lookup for information about your domain name. Information comes back that says your website is at a certain IP address. That IP address is maintained by your website hosting company. Your web browsers then asks for that IP address and your website hosting company replies back with the files that make up your website. Before any of this happened, you purchased a domain name at a domain registrar and said that the IP address of your website was what your website hosting company told you it was.