The MX DNS is a DNS record that defines the mail eXchange server. You can only use one mail exchange server at a time for a specific domain name (ie domain or subdomain).
The name of the MX record is the last part of an email address and designates the host where the email should be delivered.
When an email is send:
When you add multiple MX records, the servers they point to must belong to the same service provider.
You can query them. For instance, the mail server of gmail can be found with a dns client such as nslookup command or Network - dig ( DNS tool)
nslookup -type=MX gmail.com
# or
dig gmail.com MX
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com
gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com