Expand "Options" on the left by clicking on (+) next to it
Go to "Filters"
Then click oin "Filter Rules" at the top
You can then define new rules. For instance:
Rule Name: SPAM For an incoming message that matches: * All of the following Select a field: Choose "Subject" from the drop down list Contains: SPAM and: (you're welcome to define several fields) Do this: Deliver to Folder Create new folder: Junk Mail
This rule should move all emails with the word SPAM in the subject to a folder called "Junk Mail".
You can define rules for other fields, such as To, From, or Body.