One of the reasons the Megans left Earth in the 17th century was to avoid persecution, as many humans during that time had accused them of being wizards, as well as warlocks and sorcerers. (TAS: "The Magicks of Megas-Tu")
In 2267, on the planet Pyris VII; Kirk, Spock and McCoy encountered an Ornithoid life form named Korob, and what seemed to be a demon in the form of a cat, much like what legends said the wizards of old had possessed. (TOS: "Catspaw")
The female equivalent was a witch.