In English, the word spell has three distinct homographs, which means the word's ancestry has three distinct etymological branches—and, like any extended family, it's a complicated story.
In Middle English, spell meant "to mean" or "to signify," which probably developed from Anglo-French espelier, itself from Middle High German spellen, meaning "to relate" or "to talk." This spell, in modern English, then came to mean "to read slowly (letter by letter)."
Spell referring to magic incantation is of different origin. That word is strictly Germanic (from the noun spel) and refers to talk, storytelling, gossip, and a sermon. It also is the derivative of gospel (which translates to "good tale") and is the source for the magical power and enchantment senses of spell. English poet Edmund Spenser ties those senses of the word together in his epic poem The Faerie Queene (1590):
Spell is a kind of verse or charm, that in elder times they used often to say over everything that they would have preserved: as the night-spell for thieves, and the wood-spell. And here-hence, I thinke, is named the Gospel, or Word.
Spell also became a noun referring to a substitute and a verb referring to the act of substitution. That spell seems to be homegrown and is conceived from Old English spala (of unknown origin). When it magically appeared in the 16th century, this spell had the specific meaning of "to relieve or take the place another at work," as in the antiquated example of "the grandparents spell each other while watching their grandchildren." Used as a noun, in this sense, spell originally meant "a shift of workers." By the next century, it came to refer to "a single worker's turn at work" and then "a period spent in a job or occupation" (as in "I'm relieving you for a spell")—and, conversely, "a period of rest from work," which appears to have originated with the Australians sometime in the 19th century in the expression "Spell Oh," signaling a break from work.
Every two hours or so, the cry of "spell oh" resounds in the woolshed; and then, one by one, the shearers knock off work to enjoy a smoke and a pannikin of tea.
— Sydney News, 13 Apr. 1872
The Aussie sense is connected to an earlier use of spell that generally refers to an indeterminate period of time. (Such "spells" outside of Australia tend to be of the less-desirable kind: "a fainting spell," "a hot/cold/dry/wet spell," "a spell in prison." If you're sitting for or are in a spell and you're not in Australia, something is probably not right.)
The (mostly) Anglo-French spell, referring to reading slowly, enters English in the 14th century.
What must be the state of him who sits down to spell the newspapers with the determined resolution of believing whatever he sees in print?
— The Mirror, 1780
In the 16th century, people began "spelling" words—that is, they began naming individual letters of a word in their proper order. And it didn't take long for figurative use of the verb to develop. In fact, the Bard used both literal and figurative senses in his plays:
O, she knew well / Thy love did read by rote, that could not spell.
— William Shakespeare, Romeo and Juliet, 1594-95Why, you speak truth. I never yet saw man, / How wise, how noble, young, how rarely featur'd, / But she would spell him backward.
— William Shakespeare, Much Ado About Nothing, 1598-99
This spell led to spell down in the 1800s. That expression refers to defeating someone in a spelling match, bee, tournament, fight, etc., and the act of spelling was becoming something fierce.
There were reading exercises and a spelling-fight.
— Mark Twain, Tom Sawyer, 1876
In the 20th century, spell out, meaning "to make plain"—as in "Do I have to spell it out for you? You're fired."—comes about. Another expression is spell baker. The most famous use of that expression comes from American poet Henry Wadsworth Longfellow: "If an old man will marry a young wife, Why then … he must spell baker" [which implies that marrying a younger person has its difficulties].
The expression is suspected to have originated from the use of baker in Noah Webster's The Elementary Spelling Book as one of the first two-syllable words for children to spell. At the entry for the verb spell in his dictionary, Webster includes the example: "Our orthography is so irregular that most persons never learn to spell." So let's have a refresher...