This article in the New York Times describes the author's struggles with Obsessive Compulsive Disorder (OCD) and how he managed to overcome it after years of struggles. OCD is a mental health illness that encompasses obsessions, compulsions, or both.
Obsessions are repeated thoughts, urges, or mental images that cause anxiety. Common forms of obsessions include:
Fear of germs or contamination
Unwanted forbidden or taboo thoughts involving sex, religion, and harm
Having things symmetrical or in a perfect order
Aggressive thoughts towards loved ones or towards yourself
...and many others!
Compulsions are behaviors that an individual suffering from OCD feels the urge to do in response to an obsessive thought. The function of the compulsion is to alleviate the tension, anxiety, and nervousness that comes with the obsessive thought. Common forms of compulsions include:
Excessive cleaning and/or handwashing
Ordering and arranging things in a particular, precise way
Repeatedly checking on things, such as repeatedly checking to see if the door is locked or that the oven is off
Compulsive counting
...and many others!
The author of the article above was able to overcome his OCD on his own, using a form of interpersonal exposure that we call in TEAM-CBT "self-disclosure." He slowly started sharing his deepest fears with his loved ones and learned, over time, that he got support and acceptance in return. That reduced his anxiety and allowed him to manage his OCD.
When motivation and self-disclosure alone are not enough to get rid of OCD, exposure therapy (exposing patients to their feared stimuli) combined with a technique called response prevention can help. It is a scientifically proven intervention to help most individuals suffering from OCD to learn how to better manage their compulsions, tolerate the obsessions, and quickly overcome both of those.