The Salem trials pretty much marked the end of the Witch-hunting period, which lasted several hundred years. Interesting is the fact the the Spanish Inquisition prosecuted few witches, because they recognized it for what it was.
The witch craze took off with the publication of a book in the late 1400s, authored by a couple renegade Catholic priests if I recall correctly. The “Malleus Maleficarum”, the “Hammer of the Witches”.
In the preceding centuries the Church regarded witchcraft as nothing more than empty superstition but the authors of Malleus Maleficarum managed to make belief in witches as popular as zombies are in 21st Century America.