You can use various types of email accounts in Mail. Some of the most widely used account types include:
iCloud accounts: Use Mail on your Mac and have instant access to your messages and mailboxes on other computers (with OS X v10.8 or later) and devices (with iOS 5 or later) where you use iCloud Mail.
IMAP accounts: Messages are stored on a mail server until you delete them. When your account connects to the server, it’s synced so that the messages on your Mac are the same as those on the server. Messages are accessible from different computers and locations where you use the account.
Microsoft Exchange accounts: Similar to IMAP accounts, messages are stored on a mail server and accessible from different computers and locations where you use the account. You can use flags in an Exchange account with some limitations.
For an Exchange account to be set up in Mail, the Exchange server must support Exchange Web Services (EWS). Contact your server administrator for more information.
POP accounts: Messages are stored on a mail server and are downloaded to your Mac when you access your account. The messages remain on the server until they’re deleted from the server.