K9 works in conjunction with your incoming POP3 server and scans your email as it comes in. It decides wether it is spam or not before your mail arrives in your inbox!
As time progresses K9 learns from its mistakes and get's better at filtering what you consider as spam.
Great program, and it's for free! But it ONLY works with POP3 email.