Glossary: DNS
What is a Nameserver?
The server that holds a domain's DNS records. Changing nameservers moves control of all of those records.
What it is
When someone visits your website, their device asks your domain's nameservers where to go. Nameservers usually look like ns1.example.com, and each domain normally has at least two in case one fails.
When you would change them
You change nameservers when you want another company to control your DNS, often because you have moved your hosting. You make the change at your registrar, which may not be the same company as your host.
Check this first
Changing nameservers replaces all of your DNS records in one go, including those for email. If your email is hosted somewhere else, copy its records across first, or it may stop working.
If you only want to point your website at a new host, changing the A record can be simpler, as your DNS stays where it is.