Obsessive-compulsive disorder (OCD) is an anxiety disorder where a person has obsessive thoughts and/or compulsive activity (commonly both).
An obsession is an unwanted and unpleasant thought, image or urge that repeatedly enters a person's mind, causing feelings of anxiety, disgust or unease.
A compulsion is a repetitive behaviour or mental act that someone feels they need to carry out to try to temporarily relieve the unpleasant feelings brought on by the obsessive thought