I'll answer your questions but not in that order probably.
The host sets up a mafia game and randomly chooses who is on the mafia team/ who gets the mafia roles and who is in the town/power roles for the town. The host does not play, as they are facilitating the game. They post when a day or night cycle will begin and when it ends. At the end of day cycles a person with majority votes gets lynched, and is removed from the game and their role is revealed. During a night cycle, the mafia kills and any town power roles act too, and at the end of the night the people who were killed at night are removed from the game and their roles revealed.
Thats the basic way a mafia game works, but some games have extra or different rules based on the set-up and this is all said in the first post. The roles used in each game (role blocker, doctor, detective, godfather) are ones typically seen or are most common, but there is nothing stopping a host from putting in whatever role they want. However you can't get too crazy otherwise the balance of the game may be off, meaning it is way too easy for town/mafia to win over the other. There are roles that can't do anything but talk in the thread and vote on lynches (which is a power that every player has) and those are vanilla townies (or mafia goons who are on the mafia team).
- - - Post Merge - - -
In regard to question 3, I think you may thinking of like a role-play... where you can create your own character and play out, whatever. Mafia isn't like that. You are given your role by the host before the start of the game and must try to either kill all the mafia if you are on town side or kill all the people without getting killed yourself if on the mafia team.