There are several theories about the origin of the witch trials at Salem (originally, Danvers, Massachusetts). Some scholars argue that it was a result of the Puritan belief system; some have argued that the trials were designed to target certain land owners in order to grab their land; some believe that there may have been chemical contamination of grain that caused hallucinations and led to the witch hysteria.
A strong candidate--probably the strongest-- for the witch hysteria is the Puritan belief system. Among other things, Puritans believed in what is now called Original Sin--that is, all mankind, as descendants of Adam, are sinful. As sinful beings, Puritans believed that Satan was a powerful physical and spiritual presence in their lives and that Satan was constantly trying to draw them to his side.
Puritans believed, for example, that Satan could lead them astray in the course of daily life, posing as someone they trusted, and that Satan could attack them while they were asleep in the form of dreams. What is sometimes difficult for us to understand is that Puritans absolutely believed that evil was an active presence in their lives and that they had to be on guard constantly to defend themselves against Satan's physical and spiritual presence.
The specific belief that allowed the witch hysteria to grow and to result in the deaths of several people is called spectral evidence. This was the belief, part of the Puritan belief system, that a witch could send his or her spirit to torment people while maintaining his or her earthly form. In other words, spectral evidence essentially allowed a person to be in two places at once--one in spirit, the other in body. The question then becomes, how does one defend himself or herself against the accusation that one's spirit attacked another person while the body was busy milking cows or baling hay?