Well-known MTAs are Postfix, Exim and Microsoft Exchange. The path of a message: the mail client (MUA) hands it to the MTA, the MTA looks up the target via MX and delivers over SMTP; there the receiving MTA passes it to the MDA (e.g. Dovecot), which writes it into the mailbox.
When an MTA cannot deliver right away, it puts the message in a queue and retries at intervals, by default for up to five days in Postfix. A growing queue is an early warning sign of delivery problems or a compromised account sending spam.
For troubleshooting, the MTA's queue and log are the first places to look. Each message has a queue ID that lets you trace its whole path.
Example
postqueue -p | tail -n 5