Any thought that is intrusive, i.e. not your own thought, continual thoughts, are generally caused by Satan. These thoughts are generally bringing up something negative about a situation or person. The way to stop this happening is to do two things:
Jas 4:7 Submit yourselves therefore to God. Resist the devil, and he will flee from you.
A) Submit to God, i.e. if it is a sinful thought, wash your mind according to the word of God. Keep your mind clean.
B) Resist the devil, KEEP your mind clean, free of the thought, actively force the thought out of your mind. Actively fight the thought, don't listen to it.
As an example of this, I was at work tonight working late. I never use inappropriate contentography out of respect for my wife. However because I was alone in front of the computer, a thought kept entering my mind, "Why don't you use inappropriate content, it won't hurt any one". It was a persistent thought, kept coming. So what did I do? I resisted the thought saying "The word of God tells me 'should we continue to sin that grace may abound?' the answer being by 'no means'.". I resisted Satans attack on my mind by the word of God. And did not give into the desire. Satan left, and the thought stopped.
If you lack peace, say "the fruit of the spirit is love, joy, peace", "I will have peace".
It is a matter of applying the word of God to your situation. If you feel judgment, or hate, you fight the feeling until you feel God's love.
You replace your feeling with Gods.