In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Shaikhul Islaam Ibn Taymiyyah [rahimahullaah] said:
Amongst the people there is one who backbites to show his agreement to those whom he sits with- his companions and family- even though he knows that the person being backbitten is innocent of what they say or some of what they say; but he sees that if he rebukes them, the gathering will cease, the people in the gathering will become annoyed and turn away from him; therefore he sees that to be in agreement with them is good treatment and good companionship. And indeed when they get angry, he might also get angry due to their anger. [i.e. to show his agreement].
And amongst the people there is one who backbites in various ways- sometimes in the guise of religious affairs and rectification, whilst saying: ‘’I do not usually mention anyone except with good and neither do I like backbiting nor lying; rather I only inform you about his state of affairs’’, and then he says: ‘’By Allaah! Indeed, such and such person is a Miskeen or a good man, however there is such and such about him’’; or he might say: ‘’Leave him alone! May Allaah forgive us and him’’, however his intention is to belittle the person and elevate himself. So, he initiates backbiting in the guise of rectification and religious affairs. Indeed, we have seen – a lot – this [type of behaviour] from them and what is similar.
And amongst them there is one who raises the status of others out of show off and to raise his own status as well, saying: ‘’If only I supplicate for such and such person in my prayer due to such and such news that has reached me about him’’, in order to raise his own status and make this statement in the presence of someone who believes that he truly wants to supplicate for that person; or he says, ‘’Such and such person is simple minded and has little understanding’’, whilst intending to praise himself, affirm his own understanding and that he is more virtuous than that person.
And amongst them is one who backbites due to envy, so he gathers between two repugnant traits – backbiting and envy. And if a person is praised, he seeks to stop such praise by mentioning the short-comings of that person in the guise of religious advice and rectification, or through wicked speech and defamation to nullify that praise.
And amongst them is one who initiates backbiting in the guise of mockery and jest in order to make others laugh- mocking and belittling people. And amongst them is one who initiates backbiting in the guise of amazement, saying: ‘’I am amazed by such and such person as to why he did not do such and such, and why he falls into such and such, or why he did such and such’’; so he mentions the name of the person in the guise of amazement.
And amongst them is one who pretends to be grieved, saying: ‘’Such and such person is Miskeen. What has happened to him grieves me’’, so the listener thinks that he is grieved and feels sorry, whilst his heart is happy due to the [misfortune] that person finds himself in. And if he was able, he would have increased that [misfortune] and maybe even mentions it to the enemies of the person. This [behaviour] and other than it is one of the greatest diseases of the heart. And amongst them is one who initiates backbiting in the guise of anger and forbidding evil, so he manifests beautified speech whilst intending other than what he manifests. And Allaah’s Aid is sought! [Ref 1]
Situations in which backbiting is permissible due to an overriding sharee’ah benefit
Backbiting is permissible in several situations when the need arises: When enquiring about the affair of someone you want to marry or before establishing a business partnership with someone. When complaining to the ruler about the oppressive behaviour of someone and seeking to stop the oppression. In these situations, there is no harm- due to an overriding benefit – in mentioning about a person in his absence that which he hates to hear. Some of the scholars mention the situations in which backbiting is permissible:  Complaint given by one who is wronged;  When describing a person;  When giving a warning against open evil [i.e. bidah committed by certain people]; 4: Warning against a person who openly commits his sins.  When seeking a fatwa and  when seeking the help to stop evil. [Ref 2]
[Ref 1: An Excerpt from ‘Majmool Al-Fataawaa 28/236-238. slightly paraphrased]
[Ref 2: Fataawa Lajnah Ad-Daa’imah 20/26]. slightly paraphrased]