How it works
At the registrar, each domain lists its nameservers, usually two to four names such as ns1.example.net. The registry's servers send every lookup for the domain on to them, so they are the single source of truth for its records. By default they belong to the registrar, but you can point them elsewhere, for example to Cloudflare to use its free DNS, CDN and security features.
Changing nameservers moves all DNS management at once, so copy every existing record to the new provider first, especially the MX and TXT records for email, or mail will quietly stop arriving. The switch can take hours, occasionally a day or two, to reach everyone, because old answers stay cached.
Related terms
More in How the web works
Names and addresses