Where do superstitions come from?

How did it happen that people all over the world avoid stepping on cracks in the sidewalk or feel frightened of black cats? The story behind why we believe in superstitions is just as weird as some of the superstitions we have.