Does anyone know much about 17th century witch hunts?

I know a fair bit about the causes & events, but I’d really like to know more about why they ended. The mass hysteria they caused makes me wonder how anyone speaking out against them wasn’t trialed as a witch themselves. Though I’m sure that did happen as well. 
Did the trials stop before the belief in wide-spread witchcraft die out? How did puritans come to change their views or methods?