Take the word "spell": to write or say the letters that form a word or part of a word. That is, to assemble meaning. Usually, it means to assemble words of meaning from letters that lack meaning, methodically.
"Spell": noun, words or a formula supposed to have magical powers. Normally, one would spell words, but "spell" at one point did mean "speech, discourse" in English. So one would indeed spell spells. Spelling is the art of creating words, and words have power. One spells meaningful words from meaningless letters, just as a fictional wizard may spell magical spells from meaningless formulae, or a modern scientist may spell magical predictions from meaningless points of data, or an engineer may spell a skyscraper that can stand in the sky, from his formulas and figures, each of which lacks such power individually. I don't think that it is a coincidence that "spell" has come to share both meanings.
Read the Wiktionary page on the word "spell" to see its etymologies, which are interesting.