When someone sends mail to you@yourdomain.com, the sending mail server looks up the MX (Mail eXchange) records for yourdomain.com in DNS. The MX record points to one or more mail servers, with priority numbers.
A typical Google Workspace MX setup:
yourdomain.com. MX 1 smtp.google.com.
Priority numbers (the "1" above) let you specify backup mail servers — lower numbers are tried first. Most simple setups have a single MX record at priority 10.
Common gotcha: if you change your mail provider, you must update MX records BEFORE switching, or mail will queue at the old provider and bounce after a few days. Modusdom pre-stages DNS records when you switch email providers through us.