Take some time out
If you feel that you are being continuously annoyed by a friend, it is highly recommended that you take a break from the relation. By staying away from your friend for a couple of weeks, you will realise his/her importance in your life. Take it normally because every relation goes through ups and downs. It is highly likely that it is just a phase in your friendship and things will be back to normal within a few days.
Be patient in your reaction
If you are getting annoyed by your friend regularly, you should have enough control to resist giving an emotional and angry response. Just be patient and try to observe why your friend is behaving in such a manner. A spontaneous response is likely to hamper your relation with your friend and will worsen the situation.
Communicate with the friend
It is always important to communicate openly with your friends about your feelings. If you are getting annoyed by a specific behaviour or a habit of your friend, you should talk to him/her calmly and express your feelings. However, your choice of words should not be harsh. Your tone should be such that your friend does not get offended.
Avoid excessive communication
Having exhausted all your options, if your friend still does not change his attitude, you should limit your communication with that friend. It is better to talk less to a friend than to end the friendship in a bitter manner.
Understand the psyche of your friend
Some people are hard to deal with unless or until you understand their mentality. If you do not handle someone in the appropriate manner, which varies from person to person, he/she will most probably start to annoy you.