Spam filters use various algorithms and techniques to evaluate the content of an email. They analyze factors such as email headers, keywords, links, and the sender's IP address to determine whether an email is spam. If an email meets certain criteria, it is flagged and moved to the spam folder.