This example demonstrates how to create a filter in Gmail. In this example, the user is setting it so all emails from .edu domains will not go to SPAM.
In Gmail, click on the little arrow at the end of the Search field.
Now enter your search criteria (ex. *.edu in the From field) then press the Create filter with this search link in the bottom right corner
On the next screen, check off Never send it to Spam then click Create filter