Any domain that uses email has MX (Mail eXchanger) records. The MX record lists the various mail servers available to accept mail for that domain. Here is an example.
The domain spamtitan.com has two MX records (these are just an example and are not actual MX records):
Domain TTL Type Priority Server
spamtitan.com. 3250 MX 10 server1.spamtitan.com.
spamtitan.com. 3250 MX 20 server2.spamtitan.com.
When you send an email to a spamtitan.com address your mail server first performs a DNS lookup for the MX records for the spamtitan.com domain. This DNS lookup returns two items, the records listed above. The priority determines which record should be used first, starting with the lowest (e.g. 10 will be used before 20). If that is not available then next server is contacted and so on. In this case server1.spamtitan.com would be used if it is contactable, and if it was not contactable then server2.spamtitan.com would be used. To contact the server your mail server performs a second DNS lookup to convert the A record server1.spamtitan.com in to an IP address. Once it has the IP address it connected to the IP address on port 25 and delivers the mail using SMTP (Simple Mail Transport Protocol).
You can also use MX records of equal priority to allow both servers to be used equally, this is useful if you are using a SpamTitan cluster as it will distribute mail between your SpamTitan servers.
You can use online tools such as MXToolbox to determine your current MX records.