Although modern science has dispelled the magic of toadstones, their history still fascinates. Toadstones come from bufonite, a fossil consisting of the petrified teeth and jawbone of a fish—specifically, an extinct fish of the genus Lepidotes that was common in the Jurassic and Cretaceous periods. Considering that the teeth give a bumpy surface to bufonite, one can see how it might become associated with the toad in appearance, as it does resemble its warty skin.
As was common in the dark ages of science (during which fossils were studied by sorcerers, not anthropologists), association led to ideas. In this case, since the stones resembled the bumps on a toad, it was conjectured that they must come from a toad … and are probably found in its head. In addition, since toads were believed to have poisonous glands—naturally—they carried their own antidote and, perhaps, the antidote was the stone.
Indeed, people did come to believe that the toadstone could detect poison or counteract its effects. Supposedly, the stone would sweat, change color, or heat up in the presence of poison, and when placed on a bite, it would extract the poison. Inevitably, this magical stone was fashioned into charms, amulets, and other types of wearable decoration. William Shakespeare alludes to the fabled toadstone (and the general dislike for toads) in his comedy As You Like It:
Sweet are the uses of adversity, / Which, like the toad, ugly and venomous, / Wears yet a precious jewel in his head.
Now, you may be wondering how exactly this "precious jewel" was extracted from the toad in ancient times. First, the toad must be alive in order to retain the stone's magic. Second, you need a red blanket. Apparently, the toad likes red and likes to stretch out; when it is relaxed, it will belch out the stone:
But the Art (as they terme it) is in taking of it out, for they say it must be taken out of the head alive, before the Toade be dead, with a peece of cloth of the colour of redde Skarlet, where-withall they are much delighted, so that they stretch out themselves as it were in sport upon that cloth, they cast out the stone of their head, but instantly they sup it up againe, unlesse it be taken from them through some secrete hole in the said cloth, whereby it falleth into a cesterne or vessell of water, into which the Toade dareth not enter, by reason of the coldnes of the water.
— Edward Topsell, The History of Serpents, 1608
Or you could just place a toad in a pot full of ants:
Put a great or overgrowne Tode ... into an earthen pot, and put the same in an Ants hillocke, and cover the same with Earth, which Toade at length the Ants will eate. So that the bones of the Toade and stone will be left in the Pot....
— Thomas Lupton, Thousand Notable Things, 1576
Now go thank your nearest medical professional.