The following excerpt is from the Sir James George Frazer classic The Golden Bough.
"…are all mistaken applications of one or other of two great fundamental laws of thought, namely, the association of ideas by similarity and the association of ideas by contiguity in space or time. A mistaken association of similar ideas produces homeopathic or imitative magic: a mistaken association of contiguous ideas produces contagious magic. The principles of association are excellent in themselves, and indeed absolutely essential to the working of the human mind. Legitimately applied they yield science; illegitimately applied they yield magic, the bastard sister of science. It is therefore a truism, almost a tautology, to say that all magic is necessarily false and barren; for were it ever to become true and fruitful, it would no longer be magic but science. From the earliest times man has been engaged in a search for general rules whereby to turn the order of natural phenomena to his own advantage, and in the long search he has scraped together a great hoard of such maxims, some of them golden and some of them mere dross. The true or golden rules constitute the body of applied science which we call the arts; the false are magic."