DNS is the server that translate the Domain to IP.
To connect to the server you cant really use the domain, you must to connect via IP.
so the DNS translate xxx.com to a.b.c.d ( ip ).
Now when you connect to the server the Apache or other HTTPD server take the Domain and point it to the hosted path.
so the DNS server is just a translater from Domain to IP.
So what is Name server?
Name Server is a a connect way to the DNS servers, simple to understand: Name servers are way to connect to the DNS server that translate Domain to IP