Understanding DNS Zones

The name servers find the server and correct DNS zone in order to get the following information.

The NS records in the DNS zone must match the nameservers you are using.

The A record points your domain to an ip address. (e.g. mydomain.com -> ip address)

The CNAME record points your subdomain to another Domain Name, like www and mail. (e.g. www.domain.com -> domain.com)

The MX records control where your emails are received. If you want your mail hosted on another server, then this is what you will need to change.