MX (Mail Exchanger) records are a type of DNS record that determines which mail server is responsible for handling your email. The MX record is set to point to a canonical hostname, such as example.com or mail.example.com. This hostname is another record known as an A (address) record, which points to an IP address. That IP address is the server that will be handling the email for your domain.
You may notice there can be multiple MX records. These are set into a chronological priority order, where the lowest number gets priority. Incoming email checks for the server set for the lowest priority first. If that server does not respond, it goes to the next on the list, and so on. Companies that service large email server farms, such as Google, will have several servers to handle massive amounts of incoming emails.