What does Buddhism teach about anger? I would like to know what Buddhism says about both our own anger and other people's anger. Especially how to cope with other people's anger, how to handle it, how to avoid suffering from it? Also what are the origins and consequences of anger?
Anger
Anger is a manifestation of one of the five hindrances, the hindrance of aversion/ill-will (byāpāda). According to the Buddha, the path to happiness and Nirvana is the path of understanding and abandoning these hindrances.

“Bhikkhus, if one were to say of anything ‘a heap of the unwholesome,’ it is about the five hindrances that one could rightly say this. For this is a complete heap of the unwholesome, that is, the five hindrances.&quot; (SN 47.5)
&quot;This Noble Eightfold Path is to be developed for direct knowledge of these five hindrances, for the full understanding of them, for their utter destruction, for their abandoning.”  (SN 45.177)
&quot;I say, bhikkhus, that ignorance has a nutriment; it is not without nutriment. And what is the nutriment for ignorance? It should be said: the five hindrances.&quot; (AN 10.61)
“Bhikkhus, these five hindrances are makers of blindness, causing lack of vision, causing lack of knowledge, detrimental to wisdom, tending to vexation, leading away from Nibbāna.&quot;  (SN 46.40)

Anger, like any hindrance, obstructs the development of the other limbs of the Eightfold Path. One example is the concentration (samadhi) limb, where it's not possible to enter the first jhana, a deeper state of meditation, without being secluded from the five hindrances:

&quot;Quite secluded from sensual pleasures, secluded from unwholesome states, he enters upon and abides in the first jhāna, which is accompanied by applied and sustained thought, with rapture and pleasure born of seclusion.&quot;

When meditation is obstructed, wisdom is obstructed and so on... like a house of cards falling apart.
Nutriment for Anger
Anger manifests itself when we give careless attention to that which bugs us.

“And what, bhikkhus, is the nutriment for the arising of unarisen ill will and for the increase and expansion of arisen ill will? There is, bhikkhus, the sign of the repulsive (paṭigha): frequently giving careless attention to it is the nutriment for the arising of unarisen ill will and for the increase and expansion of arisen ill will.&quot;
-- SN 46.2

Mitigating One's Own Anger
Part of the training to dispel anger is the practice of the virtue group of the Noble Eightfold Path, in particular, Right Speech and Right Action. These are restraints on bodily and verbal action. Thus, one abandons the act of killing living beings. Also, one abandon harsh words, words that are &quot;rough, hard, hurtful to others, offensive to others, bordering on anger, unconducive to concentration&quot; (AN 10.211).
Furthermore, one also must restrain mental actions, which are the forerunners of verbal and bodily actions.

&quot;There is the case where a monk does not tolerate an arisen thought of ill will. He abandons it, destroys it, dispels it, &amp; wipes it out of existence. He does not tolerate an arisen thought of cruelty. He abandons it, destroys it, dispels it, &amp; wipes it out of existence. He does not tolerate arisen evil, unskillful mental qualities. He abandons them, destroys them, dispels them, &amp; wipes them out of existence.&quot;
-- AN 5.140

This threefold teaching related to anger is nicely put together in the following dhammapada verses:

Let a man guard himself against irritability in bodily action; let him be controlled in deed. Abandoning bodily misconduct, let him practice good conduct in deed.
Let a man guard himself against irritability in speech; let him be controlled in speech. Abandoning verbal misconduct, let him practice good conduct in speech.
Let a man guard himself against irritability in thought; let him be controlled in mind. Abandoning mental misconduct, let him practice good conduct in thought.

Restraining anger in the mind can be very challenging. A progressive teaching on how to restrain unwholesome thoughts was given by the Buddha in the Vitakkasanthana sutta (MN 20):

&quot;When a bhikkhu is giving attention to some sign, and owing to that sign there arise in him evil unwholesome thoughts [...] connected with hate then he should give attention to some other sign connected with what is wholesome. When he gives attention to some other sign connected with what is wholesome, then any evil unwholesome thoughts connected with hate are abandoned in him and subside. With the abandoning of them his mind becomes steadied internally, quieted, brought to singleness, and concentrated [...]&quot;
&quot;If, while he is giving attention to some other sign connected with what is wholesome, there still arise in him evil unwholesome thoughts [...] connected with hate then he should examine the danger in those thoughts thus: ‘These thoughts are unwholesome, they are reprehensible, they result in suffering.’ [...]
&quot;If, while he is examining the danger in those thoughts, there still arise in him evil unwholesome thoughts [...] connected with hate then he should try to forget those thoughts and should not give attention to them [...]&quot;
“If, while he is trying to forget those thoughts and is not giving attention to them, there still arise in him evil unwholesome thoughts [...] connected with hate then he should give attention to stilling the thought-formation of those thoughts. When he gives attention to stilling the thought-formation of those thoughts, then any evil unwholesome thoughts connected with desire, with hate, and with delusion are abandoned in him and subside [...]&quot;
“If, while he is giving attention to stilling the thought-formation of those thoughts, there still arise in him evil unwholesome thoughts [...] connected with hate then, with his teeth clenched and his tongue pressed against the roof of his mouth, he should beat down, constrain, and crush mind with mind.&quot;

The Buddha also narrated how he trained to dispel his own unwholesome thoughts in the Dvedhavitakka sutta (MN 19):

&quot;As I abided thus, diligent, ardent, and resolute, a thought of ill will arose in me ... a thought of cruelty arose in me. I understood thus: ‘This thought of cruelty has arisen in me. This leads to my own affliction, to others’ affliction, and to the affliction of both; it obstructs wisdom, causes difficulties, and leads away from Nibbāna.‘ When I considered thus it subsided in me. Whenever a thought of cruelty arose in me, I abandoned it, removed it, did away with it.&quot;

Finally, two mental factors, when fully developed, make it impossible for anger and cruelty to take over one's mind:  loving kindness (mettā) and compassion (karunā):

&quot;It’s impossible and inconceivable, friend, that one might develop and cultivate the liberation of mind by loving-kindness, make it one's vehicle and basis, carry it out, consolidate it, and properly undertake it, yet ill will could still obsess one's mind.&quot;
[...]
&quot;It’s impossible and inconceivable, friend, that one might develop and cultivate the liberation of mind by compassion, make it one's vehicle and basis, carry it out, consolidate it, and properly undertake it, yet the thought of harming could still obsess one's mind.&quot;
-- AN 6.13

The deeper practices of loving kindness and compassion are described in suttas such as the Atthakanagara Sutta.
Dealing with People's Anger
In one episode, the Buddha instructed Phagguna to train as follows when he is facing dispraise and violence (MN 21):

‘Neither will my mind become perverted, nor will I utter an evil speech, but kindly and compassionate will I dwell with a mind of friendliness and void of hatred.’

The Buddha taught his disciples to endure the anger from others:

“And how is a monk an endurer? There is the case where a monk is resilient to cold, heat, hunger, &amp; thirst; the touch of flies, mosquitoes, wind, sun, &amp; reptiles; ill-spoken, unwelcome words &amp; bodily feelings that, when they arise, are painful, racking, sharp, piercing, disagreeable, displeasing, &amp; menacing to life.&quot;
--AN 5.14

He taught his disciples to be tolerant towards angry people:

“And which is intolerant practice? There is the case where a certain individual, when insulted, returns the insult; when abused, returns the abuse; when bickered with, bickers in return. This is called intolerant practice.
“And which is tolerant practice? There is the case where a certain individual, when insulted, doesn’t return the insult; when abused, doesn’t return the abuse; when bickered with, doesn’t bicker in return. This is called tolerant practice.
-- AN 4.164

He also emphasized the development of equanimity when dealing with angry people, and instructed the monks to remain in healthy distance so as to not obstruct their own practice:

“And what kind of person is to be looked upon with equanimity, not to be associated with, followed, and served? Here, some person is prone to anger  and easily exasperated. Even if he is criticized slightly he loses his temper and becomes irritated, hostile, and stubborn; he displays irritation, hatred, and bitterness. [...] Such a person is to be looked upon with equanimity, not to be associated with, followed, and served. For what reason? With the thought: ‘He might insult me, revile me, and do me harm.’ Therefore such a person is to be looked upon with equanimity, not to be associated with, followed, and served.
-- AN 3.27

The Buddha pointed out that harmlessness is a protection we give not only to others, but to ourselves:

“And how is it, bhikkhus, that by protecting others one protects oneself? By patience, harmlessness, lovingkindness, and sympathy. It is in such a way that by protecting others one protects oneself.
-- SN 47.19

He taught the disciples consistently in this path even if the Dhamma, Sangha and the Buddha are insulted:

&quot;If, bhikkhus, others speak in dispraise of me, or in dispraise of the Dhamma, or in dispraise of the Sangha, you should not give way to resentment, displeasure, or animosity against them in your heart. For if you were to become angry or upset in such a situation, you would only be creating an obstacle for yourselves.
-- DN 1

Finally, he also vividly illustrated how anger has no part in his teachings:

Bhikkhus, even if bandits were to sever you savagely limb by limb with a two-handled saw, he who gave rise to a mind of hate towards them would not be carrying out my teaching.&quot;  (MN 21)