Magical Thinking
Perhaps when you were a child, you would hold your breath when passing a cemetery so that the “bad spirits” couldn't get inside your body. (If you were riding in a car at the time, you might also have simultaneously touched the vehicle's ceiling and raised your feet off the floor.) Or maybe you tried hard not to step on cracks in the sidewalk out of fear that the old saying about breaking your mother's back might somehow prove true. Some people continue (or resume) such behaviors in adulthood and become convinced that their actions, though unrelated, might sway the fates one way or the other.
So-called “magical thinking” might include the recitation of prayers (sometimes, quite elaborate) or flicking a light switch on and off a certain number of times in the belief that a specific person or persons might be guaranteed safety from harm.
Some people who have this type of OCD believe, even though they know it can't be true, that they can prevent harm to others if they try hard: saying prayers, for instance, or engaging in behaviors that they have decided, for whatever reason, will spare their loved ones death or suffering.
In an age of so many technological wonders, it may be hard for a highly imaginative person not to believe, to some degree, in “magic.” Again, it is the degree to which said thinking, and the behaviors it engenders, interferes with daily functioning that indicates, at least in part, whether you have OCD.
Depending, among other factors, on the culture in which you grew up, you might engage in various superstitious rites such as throwing salt over your left shoulder should you accidentally spill salt, going out of your way to avoid having a black cat cross your path, “making a wish” on your stray eyelashes, or refraining from placing hats on the bed. In most cases, these are not to be confused with OCD. Again, it is a matter of degree.
Essential
It's hard for many people, both those who have OCD and those who do not, not to engage in some degree of “magical thinking.” That is, if you hear a certain song on the radio, you believe it will mean a high mark on a test, or a safe flight. Or perhaps you think a “lucky” garment will ensure your success in an endeavor. Many people take comfort in these thoughts and rituals. The idea that we have absolutely no control over events, large and small, in the universe is not always a pleasant one!
For the majority of people who practice superstitious behaviors, these acts are relatively harmless and simply uphold certain cultural traditions. However, if you spent, say, more than an hour obsessing about the harm that would surely come to you (or someone important to you) because of a broken mirror, or an umbrella accidentally opened indoors — or because you inadvertently violated one of your own “rules” — and you feel compelled to try to “undo” your action with a specific ritual, then you could be dealing with something more than ordinary superstition.

