What did beliefs about God and Satan

What did beliefs about God and Satan have to do with the witch crazes of seventeenth century, one of which was the Salem witch Trials? What changed to bring about an end to witch trials all over the world?