The attitude of the Church toward witchcraft in the Middle Ages was highly skeptical, as shown in the Canon Episcopi, written around 900 AD. The gist of the document is that women who believe themselves to be witches are deluded. When the source refers to the "practice of sorcery," it means the heretical belief that one can perform magic, not the actual ability to perform it:
Bishops and their officials must labor with all their strength to uproot thoroughly from their parishes the pernicious art of sorcery and malefice invented by the devil, and if they find a man or woman follower of this wickedness to eject them foully disgraced from the parishes. For the Apostle says, "A man that is a heretic after the first and second admonition avoid." Those are held captive by the Devil who, leaving their creator, seek the aid of the Devil. And so Holy Church must be cleansed of this pest. "It is also not to be omitted that some unconstrained women, perverted by Satan, seduced by illusions and phantasms of demons, believe and openly profess that, in the dead of night, they ride upon certain beasts with the pagan goddess Diana, with a countless horde of women, and in the silence of the dead of the night to fly over vast tracts of country, and to obey her commands as their mistress, and to be summoned to her service on other nights. "But it were well if they alone perished in their infidelity and did not draw so many others into the pit of their faithlessness. For an innumberable multitude, deceived by this false opinion, believe this to be true and, so believing, wander from the right faith and relapse into pagan errors when they think that there is any divinity or power except the one God. "Wherefore the priests throughout their churches should preach with all insistence to the people that they may know this to be in every way false, and that such phantasms are sent by the devil who deludes them in dreams. Thus Satan himself, who transforms himself into an angel of light, when he has captured the mind of a miserable woman and has subjected her to himself by infidelity and incredulity, immediately changes himself into the likeness of different personages and deluding the mind which he holds captive and exhibiting things, both joyful and sorrowful, and persons, both known and unknown, and leads her faithless mind through devious ways. And while the spirit alone endures this, she thinks these things happen not in the spirit but in the body. "Who is there that is not led out of himself in dreams and nocturnal visions, and sees much sleeping that he had never seen waking? "Who is so stupid and foolish as to think that all these things that are done in the spirit are done in the body, when the Prophet Ezekiel saw visions of God in spirit and not in body, and the Apostle John saw and heard the mysteries of the Apocalypse in spirit and not in body, as he himself says "I was rapt in Spirit". And Paul does not dare to say that he was rapt in his body. "It is therefore to be publically proclaimed to all that whoever believes in such things, or similar things, loses the Faith, and he who has not the right faith of God is not of God, but of him in whom he believes, that is the devil. For of our Lord it is written, "All things were made by Him." Whoever therefore believes that anything can be made, or that any creature can be changed to better or worse, or transformed into another species or likeness, except by God Himself who made everything and through whom all things were made, is beyond a doubt an infidel."
The woodcut I used to illustrate this article is from the Cornell Witchcraft Collection: Ulrich Molitor's De Lamiis et Phitonicis Mulieribus [About Demons and Witches], 1493. It's much more of a "Renaissance" image than a medieval one. It was not until the publication of the Malleus Maleficarum in 1487 that witch fever really took hold of the educated European imagination. Previously, educated people thought that witches were deluded people who thought they could perform magic, but by the 16th century magic seemed to be a matter of substance rather than simply illusion.