Obsessive-compulsive disorder (OCD) is a type of anxiety disorder. A child with OCD has obsessive thoughts that are not wanted. The thoughts are linked to fears, such as touching dirty objects.