I used to worry about them a lot when I was younger... I used to get intrusive thoughts about committing acts of violence, self-harm and suicide that upset me a lot. Used to think I was a potential psycho or something. The more I worried about them, the more they happened.
That was until I saw a documentary all about mental health and treatment for OCD... A clinical psychologist on it explained that literally everyone (including himself) has intrusive thoughts about everything from acts of violence, to self-harm, to crime, to sex and that they are completely and totally normal. They aren't a sign of some hidden dark desire or anything like that. In fact they are usually the complete opposite, in that they often represent things that disgust, frighten or disturb you.
If you try to suppress intrusive thoughts, they inevitably happen more frequently. It's like this... Try as hard as you can not to think of an elephant. Suddenly all you can think about is elephants because paradoxically you have to consciously think of the thing you are trying to avoid thinking about. That's just the way the brain works... To actively avoid something you have to be aware of it, and to be aware of it, you have to consciously think about it.
Best thing to do is either ignore them, or just laugh at them... Once you realise that they mean nothing, they will eventually go away.