The Domain Name System (DNS) is the system that converts domain names (domain.com) into IP addresses (18.104.22.168). This system is far simpler than most people realize.
There are 3 main compontents to the dns system:
Parent Nameservers (there are 13 of them in the world)
Your domain name registrar (where you buy your domain)
Your own Name Server (where you control the dns values of your domain)
When you go to your registrar, you'll purchase a domain. When you purchase the domain, you'll specify the nameservers you want that domain to use. Your registrar will take this information (the domain name and the nameservers it uses) and will send that to the parent nameservers. This can sometimes take a few days to sync up. Once finished, any query of your domain to the parent nameservesr will return the names of the nameservers you specified with your domain. Subsequent queries will ask those nameservers (usualy at your own server), using the zones and values you've setup through DirectAdmin.