Here is a summary of how witchcraft has been defined historically:
Witchcraft has been defined in varied and evolving ways throughout history. Early definitions often associated it with malevolent sorcery or dealings with the devil. As understanding of the natural world advanced, witchcraft came to be seen less as devil-worship and more as the practice of folk magic or herbalism.
In medieval Europe, witchcraft was typically defined as the working of harm through supernatural means, often with the devil's assistance. It was primarily associated with women and regarded as a serious crime by the Catholic Church. Accusations of maleficium, or harmful magic, could lead to torture and execution under ecclesiastical or secular law.