Over the past few years I've lived with several different roommates/flatmates. Some of them were good roommates and fun to live with, and some of them not so much. No matter how close (or not close) you are with your roommate, chances are you'll end up annoying each other at some point. If you have a roommate you don't get along so well with, this probably happens more often than not. These are the main things I do whenever I'm getting annoyed or have a problem with a roommate, so hopefully they'll help you, too.
Keep your cool.
The first thing to do when your roommate is annoying you is to keep your cool. No matter how annoyed or frustrated you are, it's best to remain calm. If you start going off on them or act rudely/disrespectfully it will only make matters worse and add to the current drama. You have to live with this person, so it's best to keep a cordial relationship with even the worst of roommates. Stick to the rule Thumper taught us all - if you can't say something nice, don't say nothing at all.
Get some space.
Whenever you start to get annoyed or frustrated with your roommate, it's a good idea to get some space. If you and your roommate are good friends and spend a lot of time together, it could just be that you need some time away from them. Grab some coffee with a different friend or spend some extra time in your bedroom to get some space in that way.
If you and your roommate are less than friends, you'll want to get some space first of all to calm down. If you don't have a good relationship to begin with, it's a lot easier to lose your cool when you're especially annoyed or frustrated with the person. Getting some space will save you from saying something mean or making the situation worse. It will also help you to collect your thoughts before moving onto the next step.
Decide if you need to talk about it.
In my opinion, not every little thing that annoys you about your roommate needs to be discussed. There are some things that are just their little quirks that, while annoying, are livable and really don't harm anyone. However, there are some things that can drive you mad or are truly problematic. These things will depend on you and your roommate, so I won't tell you what's worth talking about and what's not. I would just think about whether or not I am willing to explain why this is a problem and if I am willing to work together to solve it.
Have a conversation.
This can be the scary part, and again how it goes will depend on your relationship with your roommate. If your close enough, you could probably just bring it up casually when you're both in the living room and are able to talk. If not, you might have to ask them if you two (or three/all your roommates) can set up a time to discuss it. Again, don't have this conversation if you're still upset or if you won't be able to remain calm. If you're still emotional about the problem at hand, it's best to get some space and wait until you're able to calmly discuss the matter. If you don't, it's likely that you'll create another problem that you and your roommate will have to deal with.
When you discuss the problem, don't blame anyone or use judgmental language - i.e. no "you're so lazy." Identify the problem, explain why it is a problem for you, and ask if you two can work to fix it. You don't want to go in and be their mother and start demanding they do certain tasks or tell them how to live their lives - that definitely won't get you on their good side. Instead you should talk it out and work together to find a solution - i.e. alternate who takes the trash out each week, make a chore chart, etc.
This is how I've handled problems with my roommates and it usually works out well. Sometimes I only need to go through the first two steps, and I feel much better about my roommate already. When you live with someone, it's natural to get annoyed or frustrated with them, so sometimes all you need to do is get some space. I've definitely gone through all these steps before and I have had both "types" of roommates - ones where I can just casually bring up that we need to clean our kitchen this weekend and the ones where I need to set up a meeting time so we can discuss the problem and I have to remind myself to follow all the rules I laid out. I will admit, there have been times the conversation doesn't go well, but it's better to talk about the problem and be open than to be passive aggressive about it.
Do you have roommates or have you ever lived with roommates? How do you handle problems with your roommate?