On the Internet, all computers have a unique IP address which allows packets of data to be correctly routed to the correct host. Using DNS is a fairly simple procedure, and totally transparent to the user.
Every domain has a primary DNS server and a secondary DNS server .
The primary DNS server contains a table of all the hosts in the domain, and the corresponding DNS name. It also contains a list of root servers, which are servers at the top of the DNS hierarchy server information about which servers are primary for which domains. The secondary DNS server contains this same information, which it gets from the primary server. When a host makes a request for a DNS lookup, it sends its query to the primary DNS server for its domain. If the request is in the table on the primary server, meaning that the host is in the same domain, then it returns the IP address.