In the most basic format there are two factions, one is civilians and one is mafia. The civilians do not know who the mafia is, but the mafia know who each other are. The civilians are the uninformed party and the mafia are the informed party. You get two play phases; daytime and nighttime. During the day both the mafia and civilians interact freely and each person votes for one person. The person with the most votes at the end of the day gets lynched, at which point it is revealed whether he is civilian or mafia and he then drops out of the game. During the night phase, the mafia can talk to each other and decide on one person they would like to lynch. These night time votes happens in secret and the victim is revealed by the host of the game.
The goal of the civilians is to try and kill all the mafia before the mafia kill all the civilians. That's the most basic format of the game. There are loads of variations on it, like having different objectives or having more than two factions, etc. Where the game really gets fun is if people start lying, cheating and deceiving each other. In one game I once played I was part of the mafia and I stabbed one of my fellow mafia players in the back by voting for him to be lynched so that other people would not think I was a mafia member myself. The vote eventually caught on and lots of other people also voted for him. I survived two more weeks because nobody thought I would stab one of my own in the back like that.