The brain comes up with ideas and predictions about various fears or threats. When it comes to OCD, the brain thinks it's helping, when really, it's often incorrect.
Your job is to do experiments/exposures to test the prediction you have. It will learn that most of the time, the threat never happens and will stop bugging and threatening you with it.