The worries in generalized anxiety disorder (GAD) are typically worries about real life problems, while OCD worries are often beyond what would be expected in real life, or to such a small probability that it really makes no logical sense to actually spend time thinking about it.
Also, in OCD, the thoughts can often take the form of impulses or images, while in GAD, the thoughts are typically just thoughts (e.g., what if I lose my job, what if my car breaks down, what if I don’t do well in school, etc.).
Further, there are no compulsions done in GAD to get rid of the thoughts, while people with OCD do perform compulsive behaviors to somehow neutralize their thoughts.
Finally, there are several physical or mental symptoms associated with GAD (e.g. restlessness, irritability, muscle tension, etc.) that need not be present for the diagnosis of OCD.