A faction is a team of players who share the same alignment. Any true game of mafia will have an "informed minority" (that is, a small group of players who know who each other are) and an "uninformed majority" (a large group of players who do not know who each other are). Most of the time these are referred to as the Mafia and Town, respectively. It is also possible to have players who are aligned with third parties, such as Cults; or aligned with themselves, such as Survivors. However, as a general rule the Town vs. Mafia conflict should be center stage.
The decision on who wins or loses a game of Mafia is essentially always decided on a factional level. For instance, if the Town is the only faction remaining in the game, every member of the Town wins, even if they are not alive at the end of the game.
Players who are modkilled are usually removed from their faction, and since they are dead, they are guaranteed to lose.