Turning a name into an address.
THE PROBLEM IT SOLVES
Computers connect to numeric addresses. People remember names.
DNS translates one into the other.
WHAT HAPPENS WHEN SOMEONE VISITS YOUR SITE
The browser asks a resolver where yourdomain.com is The resolver asks the root servers who handles .com The root servers point at the .com registry The registry points at your domain's nameservers Your nameservers return the address The browser connects to that address
All of that happens in a fraction of a second, and most of it is cached.
WHY THIS MATTERS PRACTICALLY
Your website and your email can point at entirely different places. DNS is what directs each.
A DNS problem makes a perfectly healthy site unreachable. The files are fine; nobody can find them.
WHAT YOU CONTROL
Which nameservers your domain uses, set at your registrar What records those nameservers publish
THE TWO PLACES
That distinction causes most DNS confusion. Changing records in the wrong place has no effect.