Mail exchange, or MX records, are used specifically to set up and route email. These records tell email hosting services where your email is hosted, so email messages sent to you can be delivered.
To set up email hosting, you usually receive at least two MX records, and part of their setup will often include different priority numbers. This tells mail servers how to send the mail. If one or more server is unavailable, mail can be routed via your second, third, etc. mail server, using that server's MX record.
The MX record with the lowest priority is used first.