To the GM...
Fundamentally, roleplaying is a social activity. A group of people, each with different beliefs, motivations, and goals, get together (in person on online) to play, and they likely each want different things out the game (with some overlap, of course).
Alongside those individual needs are the collective needs of the group. Like any group of people, your gaming group has its own social dynamics and conventions.
Stronger personalities exert their influence on the group, people align and get into conflicts with each other, and weaker personalities fade into the background or grow resentful.
Feelings can be hurt when a character dies. Frustration can build when a story encounters another complication. No team can be functional without managing the dynamics of the group as well as managing the individual players, and the same is true of your gaming group.
In order to manage this layer of the campaign, you need to manage the people in your group. Much like a host at a party, you must tend to the needs of your players. You have to communicate clearly, help set expectations, acknowledge players’ feelings, and when necessary adapt the campaign to fulfill the needs of the group.
You have to design story elements to engage the personalities and individual goals of the PCs, both in the main story (more on this in a moment) and in sub-plots.
The more a group of people works together as a team, the greater the chance that disagreements will occur. There will be differences of opinion about what course of action to take, occasionally. Or one character's actions may offend or upset the group. Events outside the game may flare up at the table, or a new RPG will come out that everyone wants to try. As the GM, you’ll often be called upon to be the “leader of the table,” to help to resolve and mediate these disputes and return the group to a level state.