Mediaeval folk believed in magic as an everyday fact and any unusual event that they couldn't explain was considered to be the result of some form of enchantment. They used the incantation 'Abracadabra' to ward off such bewitchment and as a remedy for poor health. The word was recited repeatedly, each time with the final letter being removed, until just 'a' remained. It was believed that the strength of the illness diminished as the word became shorter. The charm was also written out on paper and worn in an amulet or sewn into clothing.
No one is sure as to the origin of the strange word 'abracadabra'. It is known to have been in use in 4th century Latin but there are several theories that place the derivation before that.
A reference in print to the use of the word in English dating back to 1582 is found in Eva Rimmington Taylor's The "Troublesome Voyage of Capt. Edward Fenton"
The term is still used today as younger readers may be familiar with the 'killing curse' from the Harry Potter books - 'avada kedavra', which Rowling adapted from the Aramaic 'avra kadavra', meaning 'it will be created in my words'.