To deliver a message, the sending server looks up the recipient domain's MX record, opens a TCP connection and passes the message through a dialogue of commands (HELO, MAIL FROM, RCPT TO, DATA). Servers talk to each other on port 25, while mail clients submit outgoing mail on port 587 or 465 with encryption.
SMTP only handles sending, not reading mail:
So SMTP moves mail across the network, while related technologies handle reading it and guarding against forgery.