In an ideal world, everyone would behave calmly, reasonably and rationally at all times. People would wait their turns, respect those around them, and otherwise follow the basic code of behavior that most children begin learning in kindergarten. Unfortunately, in the real world, some people never seem to learn the basic rules of adult, human interaction. Often these people will be your bosses, coworkers, or even your family, so it is important to learn how to deal with them.
Stay calm. This step may seem obvious, but it is extremely important and far more easily said than done. Immature adults crave conflict and the attention that will bring them. As tempting as it may be, if you let yourself stoop down to their level, they've won. Although staying calm will probably only encourage them to antagonize you more in the beginning, eventually they will move on to an easier target.
Refuse to play by their scripts. Immature adults are used to making life so difficult for everyone around them that eventually people give in and give them what they want. Remind yourself that you have the power to reject the entire game that they are playing. Excuse yourself, walk away, refuse to engage in their arguments or accept their attitudes. Even if you can't always directly resist them, you can refuse to play along. (See Reference 2)
Practice empathy. Immature adults rarely have meaningful relationships in their lives, because they are too busy focusing on their own needs and creating conflict all around them. Often, their actions come from places of insecurity and pain. That may not excuse what they do and it does not mean that you should try to befriend them, but it will be easier for you to manage being around them if you try to see the good, or at least the sympathetic, in them.
Refuse to invest yourself in the relationship. Even if the immature adult is someone that you must spend time with, you do not need to spend more time, energy or effort on him than is absolutely necessary. Even if you have practiced Step 3 and are feeling more sympathetic to him, he will still be a drain on your life and your happiness if the two of you develop a strong relationship. Such people can change, but it takes a long time and they often never do.