What they do
When a server wants to deliver mail to you@yourdomain.com, it queries the MX records for your domain. Those records name the hostnames that accept mail, each with a priority number. Lower numbers are tried first; equal numbers share load.
Google Workspace typically publishes a single record pointing at smtp.google.com with priority 1. Older setups list five separate Google hostnames at different priorities, which still works and is simply the previous configuration.
Inbound only
MX has nothing to do with your outbound mail. You can send from a domain with no MX record at all. The confusion matters during migrations: pointing MX at a new provider before the mailboxes exist means inbound mail is rejected or lost for the length of the gap, while outbound carries on as though nothing happened.
What they reveal
MX records are public, which makes them the fastest way to identify who hosts mail for any domain — useful for knowing whether you are sending into Google, Microsoft or something else, since they filter differently. They also expose a gateway sitting in front of the mailbox, because appliances like Proofpoint and Mimecast take the MX position themselves.
Check yours
These run free in your browser. Nothing you type reaches a server.
Common questions
Do I need MX records to send email?
No. MX is purely for receiving. A sending-only domain works fine without one — though publishing an MX is generally advisable so bounces and replies have somewhere to land.
What does the priority number mean?
Preference order. Lower is tried first. Equal values distribute load between servers. The absolute numbers are meaningless — only their relative order matters.
Can I have MX records at two providers?
Technically yes, and it almost always causes trouble. Mail splits unpredictably between them and users find half their messages missing. Use it only for a deliberate, brief migration overlap.
Related concepts
If this is the thing going wrong
The pages explain it. If you would rather it was simply fixed, that is the work I do.