The function of your name servers is to locate the server and the correct DNS zone in order to get the following information:
- A Record - points your domain or subdomain to an IP address (e.g. mydomain.com -> IP address)
- CNAME Record - points your domain or sudomain to another domain name (e.g. www.domain.com -> domain.com)
- MX Records - control where your emails are received. If you want your mail hosted on another server, this is what you will need to change (e.g. domain.com -> server.ext).
- NS Records - must match the name servers you are using