In the simplest form a name server is a computer that contains a list of domain names and the associated IP addresses.
When a domain name is typed in a Web browser’s address bar, the name server associates that with the IP address, and the correct Web site — barring any unforeseen difficulties — opens in the Web browser window.