To put in very simple terms, at bare minimum there would be two teams.
One team's aim is to finish off the good guys - either during a night phase (more on that later) or by convincing others during the day phase that a particular member is scum. This team is known as Mafia.
The other team comprises of folks whose job is to get rid of the bad guys. Some of them have the ability to do it during the night phase. Like the mafia, they could also kill another member via a lynch during the day phase. They are known as Town.
There could be a third angle too (usually it's a solo member). His job would be to just kill - doesn't matter if it's town or mafia. He does that during the night phase. Like town and mafia, he could also convince others to lynch off a guy during the day phase. This one is known as a Serial Killer or SK.
There are other roles available too but these 3 are the most used. Then there's different game modes but that depends on who is hosting the game. In any case, the game mode will be explained by the host before commencing a game.
Pretty similar to a hugely popular game nowadays - Among Us