Spam filters that come with email clients have both whitelists and blacklists of senders and keywords to look for in emails. If a spam filter keeps a whitelist, mail from the listed email addresses, domains, and/or IP address will always be allowed.
Some internet service providers have whitelists that they use to filter email to be delivered to their customers.
If a whitelist is exclusive, only email from entities on the whitelist will get through. If it is not exclusive, it prevents email from being deleted or sent to the junk mail folder by the spam filter. Usually, only end-users would set a spam filter to delete all emails from sources not on the whitelist, not internet service providers or email services.
Using whitelists and blacklists can assist in blocking unwanted messages and allowing wanted messages to get through, but they are not perfect. Email whitelists are used to reduce the incidence of false positives, often based on the assumption that most legitimate mail will be from a relatively small and fixed set of senders. To block a high percentage of spam, email filters have to be continuously updated as email spam senders create new email addresses to email from or new keywords to use in their email which allows the email to slip through.