In this sutta Buddha talks about 2 kinds of thoughts:
#1. Thoughts of Sensuality, Thoughts of ill will, Thoughts of harm
#2. Thoughts of Non-sensuality, Thoughts of non-ill will (loving-kindness), Thoughts of Non-harm (compassion)
Type #1. Leads to your own affliction or to the affliction of others or to the affliction of both. It obstructs discernment, promotes vexation, & does not lead to Unbinding.
Type #2. Leads neither to your own affliction, nor to the affliction of others, nor to the affliction of both. It fosters discernment, promotes lack of vexation, & leads to Unbinding.
When the thoughts of type #1 arises, he advised us to reflect on the danger of this thoughts (method 2 of the Vitakkasanthana Sutta, please see the post above) and get rid of them.
In his own words: "As I noticed that it leads to my own affliction, it subsided. As I noticed that it leads to the affliction of others... to the affliction of both... it obstructs discernment, promotes vexation, & does not lead to Unbinding, it subsided. Whenever thinking imbued with ill will had arisen, I simply abandoned it, destroyed it, dispelled it, wiped it out of existence."
He also said: "Whatever a one keeps pursuing with his thinking & pondering, that becomes the inclination of his awareness."
Also please see this beautiful simile from the sutta (click on the title) :There lived a large herd of deer...