My response was, "It depends."
My quick and dirty response should have been, "Imagine the characters are working with high voltage, explosives, biological contagions, and a really big fire hose turned on full blast. Now imagine what could go wrong, pretend it's magic, and write."
A magic spell or ritual typically has the following stages: 1) purification (participants and/or place), 2) a statement of intent, 3) a summoning of magical powers or allies, 4) the performance of a magical act, 5) the dismissal of powers, and 6) rest and repose.
Anything can go wrong during these stages, and when writing magical accidents it can be helpful to think in terms of these steps and also in terms of 1) Insulation, or what steps a magic user takes to keep magical energy from "shorting out" or to keep harmful magic at arm's length; 2) Focus, or how magic is directed at a target -- and how it can ricochet at the spell caster; 3) Contamination, frequently described in a story as a spell's residual scent, signature, or vibration; and 4) Dominion, or relationship between magical power and the spell caster -- usually thought of in terms of addiction, obsession/possession or absorption/assimilation.
- A group of amateur magicians gets together to work a spell for healing. They take a few shortcuts and nothing happens -- no magical power is raised. This is the best kind of failure, although it does waste a character's time.
- In Marion Zimmer Bradley's "Web of Light", magicians with an incomplete understanding of a spell start the spell, but do not have the proper training to direct the magical energy they raise. Eventually, the energy discharges like a lightning bolt which physically brands the characters with warning symbols. Insulation failure during magical focus.
- Dion Fortune tells a tale of magic gone wrong (one of many). A group of magic users are holding hands in a circle. Magical energy outside the circle spooks one of them, they open the circle, and the energy "zaps" the room, sending the magicians to sickbed for a week. Oh, and, there's a terrible stench of drains and ectoplasmic slime appears on the walls. This is a failure of magical insulation during the performance of a magical act.
- In "The Mists of Avalon," Marion Zimmer Bradley's Morgan needs to see the future and stays too long in the spirit world. As a result she overtaxes her reserves, is seriously ill for weeks and almost dies. In this case, Morgan has changed her magical intent and focus in mid-stream and drained her (magical and physical) batteries.
- The Sorcerer's Apprentice magically animates a broom to fill his master's cistern. But he gets into deep water when he can't figure out how to make the broom stop. This is a failure of magical dismissal.
- A magician summons a daemon, but neglects to draw the magic circle on the ground correctly, and the daemon gets loose. This is a failure of magical insulation during a summoning. Usually the daemon eats the magic user, possesses them, or goes on a rampage (angry, torch-bearing, pitchfork-wielding villagers usually result).
- In the EarthSea stories, magicians who turn themselves into animals have to be careful that they do not stay in animal form too long, lest they lose themselves in the shape and lose the ability to change back into humans. In Disney's "Shaggy Dog," the Egyptian spell to turn someone into a dog must not be repeated too many times, or the spell caster risks turning themselves into a dog. Contamination in repose?
- And for an example of contamination during use: Frodo the Hobbit is counseled not to use the One Ring too much or he will become a new Dark Lord. In the end, he claims the ring for his own. In fact, all six books of the Lord of the Rings is a meditation on why the magic ring cannot be safely used by anyone.
The other place magic can hurt you is in a fight. In most cases of magical attack, if the spell isn't producing lethal amounts of fire or electricity, or calling up a nasty fighting monster, the magical duel is about seeing who can last the longest simultaneously casting attack and defense spells before falling over because they've exhausted their physical and magical reserves. For some reason, fighting magic users never expect non-magical, physical weapons. The last startled look of a dying magician is typically focused on a tiny yet fatal glass dagger (or similar mundane weapon which didn't set off their magical alarms and shields).