What are witches and why were they believed in? All answers to this question are controversial, but let's look at the history.
From our earliest records people have seriously practiced magic and had experts who specialized in such arts. Also, it was common to distinguish between white (well-intentioned) magic and black (evil-intentioned) magic, each with its own practitioners. While people did practice black magic, this concept more commonly resulted in identifying a scapegoat. When something bad happened, one possible explanation was a witch had cast a spell on you. As a result, people were labeled as witches who did not actually practice black magic.
Now Christianity held all magic was wrong and the only legitimate source of supernatural help was God. But when Europe became nominally Christian, many of the old ways persisted. During the Early Middle Ages, such practices were not acceptable but tended to be winked at. When someone was caught doing it, they got off with a stiff penance. The killing of people for black magic was done by mobs, the authorities attempting to intervene to save the victims or at least give them a Christian burial. This was because it was believed that demonic ability to do miracles was limited and the more blatant acts attributed to them were illusions. They did not make people fly around at night on broomsticks, but caused them to go into a trance and believe they had done so. Some today have also suggested a trance as a possible explanation for this kind of phenomenon.
But pagan superstition crept into the church, distorting the picture. The picture of demonic beings became more powerful, but cruder. The demons could actually do the things attributed to them, but they were less subtle in their approach to evil. They demanded direct worship, engaged in orgies with humans, and offered benefits to those who were willing to sell their soul. This became a useful way to slur your enemies; the established church used it against dissenting churches, Philip VI of France used it against the Knights Templar, and it eventually became a common approach in village witchcraft accusations. The result of this was the standard stereotype of witches who sold their soul to the devil, rode around on broomsticks, and had black cat familiars. This was furthered by the paranoia connected with the black plague and the Reformation, which forced both sides to take their beliefs seriously. Later, secular people looked at the full blown stereotype and said, "There are no witches". They then used the witch trials as a way to argue against Christianity, often over-simplifying the issues. Afterwards, some read back in the idea of an organized witch cult to explain the stereotype.
The moral of this is we need to beware of reading foreign ideas into Scripture. Also, while we do not want to underestimate Satan, we need to beware of making him too powerful. This leads to fear and discourages trust in God.