The Domain Name System (DNS) is used to translate human-friendly host names into IP addresses. It implements a hierarchical namespace where each level of the hierarchy is administered separately. DNS servers store resource records containing name-value pairs that map names to IP addresses or other information. When a name is queried, the DNS system recursively searches through these records across multiple name servers to return the corresponding value.