Obsessive–compulsive disorder (OCD) is a type of anxiety disorder primarily characterized by repetitive obsessions (distressing, persistent, and intrusive thoughts or images) and compulsions (urges to perform specific acts or rituals). The OCD thought pattern may be likened to superstitions insofar as it involves a belief in a causative relationship where, in reality, one does not exist. Often the process is entirely illogical; for example, the compulsion of walking in a certain pattern may be employed to alleviate the obsession of impending harm. And in many cases, the compulsion is entirely inexplicable, simply an urge to complete a ritual triggered by nervousness.
In a slight minority of cases, sufferers of OCD may only experience obsessions, with no overt compulsions; a much smaller number of sufferers experience only compulsions.