Conflict is one of the things that makes Dungeons and Dragons great. It's fun to get into an NPC's face, to talk trash about another character behind the character's back, or get into fisticuffs with a friend. It's one of the beautiful things about roleplaying: you can do things that you can't in real life. But, when you play with people sometimes the lines between character and player can blur. Sometimes, like with any videogame, book or movie, someone won't like the decisions made by the creator. Conflict out of game is not fun, and can on rare occasion be something that ruins the beauty of the game. Here are a few ways you can mitigate and prevent conflict within you group.
Meeting up with your group before you begin a campaign is a must. Even if you're only going to be playing a one or three level adventure, going through the practices of a Session 0 are necessary to manage expectations and avoid players and DMs getting on each other's nerves. The goals of a Session 0 as a DM are to impart what kind of tone and setting you're aiming for with the campaign, as well as mentioning any homebrew and UA rules that you use that the players should expect. As a player, it's a good idea to have some kind of idea what kind of character you plan on playing, both stylistically and class/race wise. That way you won't step on any other player's toes if they wanted to do something similar. Sometimes it ends up creating an opportunity for building a character in tandem with someone else, which also tends to be tons of fun. What you never want to happen is have everyone show up to Session 1 expecting something different, playing similar characters and wanting completely opposing things. Remember:
1. Manage expectations: is this a fantasy setting? Roleplay heavy? Will there be a battlemap? Will backstories be worked into the campaign? Do you know how long the campaign will be? Are any character options off limits?
2. Establish Tone: how serious will this campaign be? Will the players be dealing with existential horrors or rescuing princesses? Both? Should the players be prepared to die a lot or escape more often than not?
3. Introduce the World: it is very difficult for players to build a backstory without knowing anything about where they are allowed to be from. You only need to provide a little bit of information, but it will go a long way for your players.
Out of game communication cannot end with Session 0. Checking in can be as easy as asking "how is everybody doing? Anything anyone wants to see more or less of?" or anything along those lines. It only takes a few broad questions for players to open up about the campaign, and you should be able to learn a lot about the other side of the game. This is important for players to ask too from time to time. Check in with your fellow players so that they have the chance to voice any issues they or their characters are having with your characters, and as always, take care of your DM. They put in a lot of work so that you can play your character and you need to be mindful of that. There's nothing wrong with checking on how every session goes, but in general you only need to do so every few sessions. That being said, if you notice someone at the table changing their behaviour suddenly, especially if there is a distinct plot point or action that occurs and afterwards their behaviour changes, that's generally a sign that you should make sure they're still having fun.
Rule Lawyers and "That Guy"s
Perhaps the two most iconic stereotypes when it comes to DnD players, each presents a unique challenge. First, the Rules Lawyer. A player that does not struggle with roleplay and is simply knowledgeable about the RAW rules is not a problem, and should not be treated as such. If you plan on changing or omitting rules, simply be as upfront as possible about that, and when a player corrects you or reminds you of a rule that you forgot? That's a good thing, they're trying to help. That being said, Rules Lawyers should never get in the way of roleplay or scene setting. If a player is constantly interrupting for no other purpose than to remind everyone of a rule, especially if that rule is barely relevant, then they begin to stretch into "That Guy" territory. For those unfamiliar, a "That Guy" is a player that is perpetually in conflict with either the group, the DM or both. They tend to justify their actions with "it's what my character would do" and have little regard for anyone outside of the game world. Some "That Guy"s need only be shown how their actions are effecting others and they may begin to change behaviour. Unfortunately this is rarely the case, and if a player is called out for being selfish or unsympathetic, for dominating the table or for being creeps, it needs to be headed off early and wholeheartedly. Often this task falls to the DM, but it is a job that requires all at the table to help with. A player who is affecting the enjoyment of others must be told such and asked kindly to consider adjusting their actions. If they continue then they must be dealt with more harshly, being cut off in turn and treated with the same amount of respect they extend to everyone else (presumably little). Finally and unfortunately, if a player is forcing others away from the table they should be uninvited. This is a drastic final step, and one that should rarely if ever be employed, but everyone has a right to come to a DnD session and have fun. If someone is preventing that and is unwilling to change their behaviour, they must be removed.
It's a bit of a dour note to end on, but it's also the most drastic action to the most drastic type of player. In general, everyone is at a DnD session to chill out and have a great time, so 90% of conflicts can be solved with some earnest conversation. In the end, everyone is a person and should be treated as such. Keeping that in mind and making sure everybody knows what to expect when they sit down for a game will ensure that everyone is having a great time.