The Buddha explains how to cultivate the higher mind through similes whenever a harmful or unwholesome thought associated with desire, aversion, or delusion arises. Applying these five methods in a gradual sequence leads to abandoning of unwholesome thoughts, and to steadiness, calming, unification and collectedness of the mind.
Vitakkasaṇṭhāna sutta - Shaping Of Thoughts
Thus have I heard - At one time, the Blessed One was dwelling in Sāvatthi, in Jeta's Grove, Anāthapiṇḍika's park. There, the Blessed One addressed the bhikkhus: "Bhikkhus."
"Venerable sir," those bhikkhus replied to the Blessed One. The Blessed One said this:
"Bhikkhus, a bhikkhu who is cultivating the higher mind should, from time to time, attend to five signs. What five?
1 Here, bhikkhus, when a bhikkhu attends to a certain sign, and while attending to that sign, harmful and unwholesome thoughts associated with desire, associated with aversion, or to do with illusion arise, then, bhikkhus, that bhikkhu should shift his attention from that sign to another sign, one associated with what is wholesome. As he shifts his attention to another wholesome sign, those harmful, unwholesome thoughts associated with desire, associated with aversion, or to do with delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
Just as, bhikkhus, a skilled carpenter or carpenter's apprentice might use a fine peg to knock out, extract, and replace a coarse peg, so too, bhikkhus, when a bhikkhu attends a certain sign, and while attending to that sign, harmful and unwholesome thoughts associated with desire, associated with aversion, or to do with delusion arise, then, that bhikkhu should shift his attention from that sign to another sign, one associated with what is wholesome. As he shifts his attention to another wholesome sign, those harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
2 If, bhikkhus, while that bhikkhu is shifting his attention from that sign to another sign, one connected with what is wholesome, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then, bhikkhus, that bhikkhu should closely examine the drawbacks of those thoughts: 'These thoughts are unwholesome, these thoughts are objectionable, these thoughts lead to discontentment.' As he closely examines the drawbacks of those thoughts, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
Just as, bhikkhus, a young woman or man, fond of adornments, would feel horrified, ashamed, and disgusted if the carcass of a snake, a dog, or a human were hanging around their neck, in the same way, bhikkhus, if, while that bhikkhu is shifting his attention from that sign to another sign, one associated with what is wholesome, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then that bhikkhu should closely examine the drawbacks of those thoughts: 'These thoughts are unwholesome, these thoughts are objectionable, these thoughts lead to discontentment.' As he closely examines the drawbacks of those thoughts, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
3 If, bhikkhus, while that bhikkhu is closely examining the drawbacks of those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then, bhikkhus, that bhikkhu should disregard them and not give attention to them. As he disregards and does not give attention to those thoughts, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
Just as, bhikkhus, a person with sight would not want to see forms that had come within range of his vision, so he would either close his eyes or look away in another direction, in the same way, bhikkhus, if, while that bhikkhu is closely examining the drawbacks of those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, they are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
4 If, bhikkhus, while that bhikkhu is disregarding and not giving attention to those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then, bhikkhus, that bhikkhu should focus on stilling the thought-formation of those thoughts. As he focuses on stilling the thought-formation of those thoughts, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
Just as, bhikkhus, a person might walk quickly, and they would think: 'Why am I walking quickly? What if I were to walk slowly?' So they would walk slowly. Then they would think: 'Why am I walking slowly? What if I were to stand still?' So they would stand still. Then they would think: 'Why am I standing still? What if I were to sit down?' So they would sit down. Then they would think: 'Why am I sitting down? What if I were to lie down?' So they would lie down. In this way, bhikkhus, that person, by avoiding coarse postures, would adopt progressively more refined postures. In the same way, bhikkhus, if, while that bhikkhu is disregarding and not giving attention to those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, they are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
5 If, bhikkhus, while that bhikkhu is focusing on stilling the thought-formation of those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then, bhikkhus, that bhikkhu should, with his teeth clenched and his tongue pressing against the roof of his mouth, restrain, subdue, and overwhelm his mind with his mind. As he, with his teeth clenched and his tongue pressing against the roof of his mouth, restrains, subdues, and beats down his mind with his mind, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
Just as, bhikkhus, a strong man might seize a weaker man by the head, by the throat, or by the shoulders and restrain, subdue, and overwhelm him, in the same way, bhikkhus, if, while that bhikkhu is focusing on stilling the thought-formation of those thoughts, harmful and unwholesome thoughts associated with desire, aversion, or delusion still arise, then, that bhikkhu should, with his teeth clenched and his tongue pressing against the roof of his mouth, restrain, subdue, and beat down his mind with his mind. As he, with his teeth clenched and his tongue pressing against the roof of his mouth, restrains, subdues, and beats down his mind with his mind, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
1] Bhikkhus, when a bhikkhu, having attended to a certain sign, and while attending to that sign, harmful and unwholesome thoughts associated with desire, aversion, or delusion arise, then by attending to another sign connected with what is wholesome, those harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected. 2] When he examines the drawbacks of those thoughts, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected. 3] When he disregards those thoughts and does not give attention to them, the harmful and unwholesome thoughts associated with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected. 4] When he focuses on stilling the thought-formation of those thoughts, the harmful and unwholesome thoughts connected with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected. 5] When, with teeth clenched and his tongue pressing against the roof of his mouth, he restrains, subdues, and beats down his mind with his mind, the harmful and unwholesome thoughts connected with desire, aversion, or delusion are abandoned, they disappear completely. With the abandonment of those thoughts, his mind becomes internally steady, calmed, unified, and collected.
This is called, bhikkhus, a bhikkhu who is skilled in the shaping of thoughts. Whatever thought he wishes to think, he will think it. Whatever thought he does not wish to think, he will not think it. He has cut off craving, uprooted the fetters, and through the full understanding of conceit, he has made an end of suffering."
The Blessed One said this. Those bhikkhus were satisfied and rejoiced in the Blessed One's words.