Magic is a supernatural force. It can be channeled into something fantastic like the creation of a dragon out of thin air, or something relatively mundane like making small objects levitate. In order to harness the raw power of magic, an individual requires certain skills and/or attributes (such as training, innate ability via heredity or something else, etc), and even then the amount of magical power any one person can control is usually limited. Manifesting in a variety of ways, the methods used to channel magic are diverse; incantations, artifacts, complex rituals, potions, the list goes on and on.
While magic itself is merely raw power, therefore incapable of possessing any innate morality, it is sometimes seen as purely 'good' or 'evil'. As previously stated, this is not only illogical but impossible, and it falls upon the user to decide whether to use the powers they wield honorably or not (just as it falls upon any individual with power). That being said, there are many individuals within the world of comics that utilize magic, both villains and heroes.
Characters like Dr. Fate, Zatanna, and Zatara have used magic to fight crime. Zatanna casts her magic by reciting the desired action backwards (though as has been stated this is a mental exercise for her to focus on the complex magics.) In DC Comics, magic has been considered entirely separate from science. It has also been established that magic always has it's price. Many of the DC heroes which use magic are dependent on magical items such as the Helmet of Fate or the Ruby of Life, though the same characters that use these items may display some magic abilities without them. Of course these magical items all have their value due to their rareness and power. Magic is also one of Superman's few weaknesses.
In Marvel, some characters that employ magic are Doctor Strange, Witchfire, Magik, Ashake, Brother Voodoo, Doctor Doom, Forge, Nico Minoru,(though the Staff of One is the only way she is able to use magic) and Enchantress.
In the 1940's newspaper's who were concerned with superhero comics cutting into their profits started publishing full sized comic books in the weekly newspaper. For a while a character known as Mr. Mystic was feature in every issue. Mr. Mystic seemingly had the power to do anything and was made invulnerable due to an amulet he wore.
Mr. Mystic was able to enlarge himself to a size where he was able to capture planes with his bare hands. He could transform himself or anyone else into different objects. He could even melt a person into a puddle. Mr. Mystic is also able to transport himself into another place by his magic.
There are several powerful magic users in the Malibu Universe including Mantra, Archimage, Yrial and Boneyard. Magic in this universe is divided into elements such as air and fire, but are not limited to those elements. People are born with mystical potential and learn the ways of sorcery, such as Mantra.