Dynamic Host Configuration Protocol (DHCP) is a protocol that automatically assigns and manages IP addresses, subnet masks, and related network parameters to each device on a network or subnet. It is possible that Network administrators can statically and manually configure IP addresses to devices on their network. However, DHCP avoids that manual configuration and assigns IPs dynamically and automatically whenever devices join a network platform. Moreover, Automatic Private IP Address (APIPA) is used to assigns IP address to hosts whenever the DHCP protocol fails. However, APIPA assigns IP addresses to clients only from a range of [169.254.0.1 – 169.254.255.254] with a [255.255.0.0] default subnet mask.
DNS (Domain Name System) is a hierarchical and decentralized naming system mainly used to resolve hostname or domain name into its corresponding IP address and back. DNS –> (Hostname <—> IP address)
In short, DHCP protocol is primarily used to centrally assign IP addresses to hosts whereas DNS is responsible to resolve hostnames to IP addresses and vice versa in a decentralized fashion.