The best explanation I first read about intrusive thoughts was baked into one of the longer Subnormality comics (forgive me for not having the week free to find the specific one!) and amounted to:
An intrusive thought is when your brain notices something bad and tries to shout a warning about it (because it's bad!) but the key modifier on the sentence comes out so quiet that it gets lost. "Don't lick the knife!" comes out as "Don't lick the knife!" and thus you "hear" it as "Lick the knife!" But that wasn't how it started.
I recently came across this post by tumblr user accessibleaesthetics and very much like it too:
intrusive thoughts are basically your brain’s (sometimes very upsetting) way of saying “If there were two guys on the moon and one of them killed the other with a rock would that be fucked up or what?” [...] It’s just your brain deciding to process the fact that it knows an uncomfortable thing exists in the world by feeding it to you in an absurd “what if” with you as the main character.
Intrusive thoughts are bastards no matter what, but I've always been a little comforted to have them reframed like this.