The MX record (MX stands for Mail Exchange) itself is harmless, it only says which server receives the e-mails for which domain. Simplified, someone sends a mail to [email protected] The mail server now asks the DNS who is processing the mails for domain.com. The DNS answers: mail.domain.com is the server that does this. Now the server knows where to send the mail. Just like the postal code of the sorting machines says, where the journey goes.
However, a MX record may only refer to an A record in the same or another domain. Rarely used but also possible is the direct indication of an IP address. RFC does not allow the MX record to refer to an alias (CNAME). But most mail servers still accept this.