Network services
IMAP
How a reader gets mail from their own server: it stays on the server, in folders, seen alike from every device.
IMAP is how a mail program reads mail that stays on the server, in folders, so every device sees the same mailbox. The client logs in (TCP 143, or 993 inside TLS), selects a folder and fetches messages; each command carries a tag that its reply repeats. POP3 (110) instead downloads the mail and usually deletes it from the server. IMAP never sends mail: that is SMTP.