Spam can be identified using a number of techniques. Header and body tests search for known words and other characters; these are the bulk of tests provided by SpamAssassin. Various network tests including ORBLs and message databases can be used to detect spam.
Statistical filters that use mathematical techniques to learn the properties of spam and ham can be used to effectively filter spam in addition to email header analysis. Although tools to detect spam are available and can be used, it is also the users' responsibility to report spam to effectively reduce the constant menace of spam emails.