In obsessive compulsive disorder (OCD), there is malfunctioning in brain circuits, which include circuits centered on the amygdala, and the cortico-striato-thalamo-cortical (CSTC) circuit. All anxiety disorders, including OCD, have problems with these two anxiety circuits, where fear is centered on the amygdala, and worry is centered on the CSTC circuit.
In OCD, there is a malfunction in these circuits, where there is a redundant and repetitive loop. So when you have obsessions, this is a type of worry, and these obsessions are caused by repeated malfunctioning in the CSTC circuit. These obsessions then trigger the amygdala, which causes fear and physical anxiety symptoms. As these fear and anxiety symptoms are uncomfortable, you then engage in compulsive behaviors in an attempt to decrease the anxiety caused by the obsessions. However, the compulsions only serve to decrease the anxiety temporarily, until the next time an obsession occurs.
This negative cycle of OCD is repeated over and over, coinciding with redundant and repetitive malfunctioning in the CSTC and amygdala circuits.