The primary parts of the brain are: the frontal lobe (located exactly where its name suggests; it includes the prefrontal and orbital cortex); the temporal lobe (beneath it, and extending back); the occipital lobe (the small section at the back); the parietal lobe (between frontal and occipital); the cerebellum (at the bottom); and the brain stem (beneath and beside it).
Deep inside the brain, the basal ganglia — containing the caudate nucleus, the putamen, and the amygdala — seem to be where much of the OCD activity happens in people who have the disorder. The orbital cortex (located directly behind the eyes) also plays a role; imaging studies have shown increased activity not only in the orbitofrontal cortex but in the cingulate gyrus as well. The increased metabolic activity in these regions — the orbital frontal cortex, the cingulate gyrus, and the caudate nucleus — has been shown to modulate after successful treatment for OCD.
Brain scans have shown that, over time, medication or cognitive behavior therapy (or both) can actually physically alter the brain's chemistry. OCD is also sometimes known to be associated with seizures (usually more than one) or brain injury.
There are also neurotransmitters (specific brain chemicals that help neurons or nerve cells to communicate), one of which is serotonin — the one you'll hear so much about, particularly in the phrase “selective serotonin reuptake inhibitors,” or SSRIs.
Research suggests that OCD symptoms can arise in some people following traumatic brain injury. Studies already show a connection between head injury and the development of psychiatric disorders, although OCD tends to develop less often than other behaviors (such as poor impulse control). There can be a lag between the time of the injury and the time symptoms develop, so it's not always clear that the injury caused the behaviors.
Serotonin (also known by its scientific name, 5-hydroxytryptamine) regulates sleep, mood, appetite, and other things. It is essential for well-being and general functioning. It is believed that a deficiency of this crucial chemical contributes tremendously to the presence of OCD (as well as to depression). It is also believed that a lack of serotonin is an inherited condition, which could help explain the apparent genetic link.
Some brains do not have enough serotonin. In people who have OCD, the neural pathways have been shown to be much more active than in persons who don't. Many good books are available that can explain the exact science in detail.
The upshot, however, is that OCD is initiated in the brain, not in the mind. (Although it is common for those who have OCD to intellectualize, or rationalize, their unusual behaviors with complex, after-the-fact explanations, these retrospective thoughts are not the source of the OCD. The mind seeks to explain activity generated in the brain.) Also, calming actions can actually be seen to slow down all that repetitive, negative activity.