With OCD, the obsessions cause significant anxiety, and people feel the need to assuage those feelings with irrational and repetitive behaviors. With other types of anxiety such as social anxiety, panic disorder, or separation anxiety, the feelings of distress are usually connected to just one source, and they’re not associated with compulsions or behaviors to fix those feelings. Someone with anxiety might start avoiding situations—for example, skipping parties—and they may become more obsessed with worries over social interactions, but it doesn’t reach the level of repeated behaviors such as checking, counting, or performing rituals.
The other difference is that, while the fear is exaggerated, anxiety disorders are usually based in reality. For example, a child who is anxious about their mother dropping them off at preschool might fear that their parent will not come back to get them. But with OCD, the fears have no connection to real life—a child will think, “If I don’t turn my pillow around 18 times, my mother is going to die in her sleep.”