(These aren't all necessarily different machines or even different programs, but it is helpful to name each step.)

The mail user agent (MUA) runs on the user's computer and is what they use to send or read messages. Let's say they send something: that message will be uploaded to to the submission agent (MSA) which checks the user's password before handing off to the mail transfer agent (MTA).

The transfer agent's job is to talk to other mail servers and get the message to the receiving side's MTA. Once received, it's given to the local delivery agent (LDA) to be stored until the recipient checks their email. The name "LDA" is non-standard, but I use it to avoid having four different abbreviations differing by a single letter.