Dungeons and Dragons is a cooperative game where you'll be playing alongside friends or colleagues, unless you join an existing group. Playing with strangers can be scary for new players but here are a few tips for you. These tips also apply to playing with friends, but you'll usually get along better with people you know.
#1. Just have fun.
Most people just want to have fun and don't really care too much what their teammates do (to a certain extent) and will happily follow whoever decides to take the lead. The Bard who just wants to woo the ladies, the Paladin who follows a knight's code, the Rogue who wants to pocket all the treasure. Everyone has something they want to do and that's fine, so long as they're having fun.
Which brings us to the next point...
#2. Don't be a control freak.
While organization and teamwork are very important in cooperative games, you need to be careful not to force others to do something they might not want to. It turns a game about freedom and expression into a chore. Players who do this will often find their teammates resisting their instructions and sometimes their plans will be sabotaged out of spite, working together only works when everyone agrees.
#3. Help each other out.
No single player can accomplish everything, no matter how many things your character can do. Even if you can magically solve every problem you come across, you might not be able to do everything at once. Every character has something they can do better than others, so you need to consider who is chosen for any given task. If you feel like your character doesn't get much chance to shine talk to your DM about this and see if they can tweak a few things, nobody like being a third wheel.
#4. Talk things out.
Every so often you'll run into a situation where multiple people will disagree on something and that's perfectly normal. If you get into an argument with your teammates, try and talk things out instead of fighting. If you can't come to an agreement you can always split the party if necessary, just don't punish your other teammates just because of spite. Remember that anything that interferes with the game will affect everyone,not just those you're arguing with.
Which brings us to our final point...
#5. It's OK to say NO.
If you feel like you're not seeing eye to eye with someone, most of the time they'll accept it if you just say no. So long as you're not being unreasonable, most people will leave it at that and get back to the game. They are there to play after all so spending as little time on an issue is what most players want. If you feel like you're in a group that makes it hard to follow these steps, maybe that group isn't for you. It's perfectly fine leaving a group you're not comfortable in, if you've found this group you can always find another.