OCD is a psychiatric condition, where the person gets irresistible repeated thoughts or sensations to do the things over and over again. Few of the common things are: repeated hand washing, checking the door, clean the dishes again and again after they are done, clean the house/garage, counting the same thing, eating disorders, sexual obsessions, biting nails, pulling hair, collecting the stuff from dumpster and fill the house that are not useful for anybody. Sensations are called obsession, that irresistibility is called compulsive.
In OCD, altered neurotransmitter function gives different patterns in their brain scan. Serotonin activity goes down and dopamine function goes up, and there is altered glutamate pathway.
Most of the time these symptoms associated with anxiety and fear.
Psychiatrist will give the diagnosis when the person satisfies the criteria as per DSM V. Obsessive-compulsive personality disorder presents as an extensive pattern of preoccupation with perfectionism, orderliness, and interpersonal and mental control, at the cost of efficiency, flexibility and openness. Symptoms must appear by early adulthood and in multiple contexts. These obsessions or compulsions must be time consuming or cause impairment in social, occupational functioning.