The actual ironic thing is that women that were called "witches" never posessed any magical skills or dealt any damage they were accused of doing. They were all innocent women burned by the (un)holy inquisition. It's a great shame mark that will remain on the church, no matter what they try to hide it.
About their strange behavior that seemed to people like as a possession by demons, it was a psychical illness. Imagine the atmosphere of that time - the inquisition spreading the teaches that all humans will die after the life and will rot in the earth, their souls coming into "heaven" if they were good. All the bad thoughts about women being all the source of sin and anything bad that happens to the people. Coming again from the church and their perverted quotes of the Bible. Illnesses that people had all the time then, because of lack of hygiene. Bad living conditions, many people being almost nothing posessing and poor. No wonder there were psychotic illnesses happening all the time...
But this is going little off topic here.