Link to the game:
http://www.blankmediagames.com/What Town of Salem essentially is, is there are 3 teams: Neutral, Town, and Mafia.
The Job of the Mafia:
Obviously, to win, the Mafia have to kill all of the Towns and Neutrals before they themselves are killed. There are some neutrals that can win with both the Town and the Mafia.
The Job of the Town:
To win, the Towns have to snuff out and hang all of the Neutrals and Mafia. To do this, there are numerous Investigative, Protective, Killing, Power, and Supporting town roles. Together, they have to work together to survive and find the Mafia/Neutrals, and lynch them.
The Job of the Neutrals:
With the difference in roles for the neutrals, they have many separate jobs. But, since they are Neutral, they can choose to survive with the Mafia or the Townspeople.
For a list of roles, and their uses, go here:
http://www.blankmediagames.com/roles/