The Domain Name System (DNS) translates domain names to IP addresses and lists mail servers for each domain. It works by organizing domain names in a hierarchical tree structure with authoritative name servers at each level publishing information about domains below them. When resolving a domain name, a DNS server first checks its cache, then queries root servers, then name servers for higher level domains, progressing down the tree until the IP address is found.