Dispel Magic

Because magic is powerful, so too is the ability to dispel magic. You can use Dispel Magic to end ongoing spells that have been cast on a creature or object, to temporarily suppress the magical abilities of a magic items, to end ongoing spells (or at least their effects) within an area, or to counter another spellcasters spell. A dispelled spell ends as if its duration had expired. Some spells, as detailed in their descriptions, can't be defeated by Dispel Magic. Dispel Magic can dispel (but not counter) spell-like effects just as it does spells.

Note
The effect of a spell with an instantaneous duration can't be dispelled, because the magical effect is already over before the Dispel Magic can take effect. Thus, you can't use Dispel Magic to repair fire damage caused by Fireball or to turn a petrified character back to flesh. In these cases, the magic has departed, leaving only burned flesh or perfectly normal stone in its wake.

You choose to use Dispel Magic in one of three ways: a targeted dispel, an area dispel, or a counterspell:

Targeted Dispel
One object, creature, or spell is the target of the Dispel Magic spell. You make a dispel check (1d20 + your caster level, maximum +10) against the spell or against each ongoing spell currently in effect on the object or creature. The DC for this dispel check is 11 + the spell's caster level.

If you target an object or creature that is the effect of an ongoing spell (such as a monster summoned by Monster Summoning), you make a dispel check to end the spell that conjured the object or creature.

If the object that you target is a magic item, you make a dispel check against the item's caster level. If you succeed, all the item's magical properties are suppressed for 1d4 rounds, after which the item recovers on its own. A suppressed item becomes non-magical for the duration of the effect. An interdimensional interface (such as a Bag of Holding) is temporarily closed. A magic item's physical properties are unchanged: A suppressed magic sword is still a sword (a masterwork sword, in fact). Artifacts and deities are unaffected by mortal magic such as this.

You automatically succeed on your dispel check against any spell that you cast yourself.

Area Dispel
When Dispel Magic is used in this way, the spell affects everything within a 20-foot radius.

For each creature within the area that is the subject of one or more spells, you make a dispel check against the spell with the highest caster level. If that check fails, you make dispel checks against progressively weaker spells until you dispel one spell (which dischargers the dispel magic spell so far as that target is concerned) or until you fail all your checks. The creature's magic items are not affected.

for each object with the area that is the target of one or more spells, you make displ checks as with creatures. Magic items are not affected by an area dispel. For each ongoing area of effect spell whose point of origin is within the area of the Dispel Magic spell, you can make a dispel check to dispel the spell.

For each ongoing spell whose area overlaps that of the Dispel Magic spell, you can make a dispel check to end the effect, but only within the overlapping area.

If an object or creature that is the effect of an ongoing spell (such as a monster summoned by Monster Summoning) is in the area, you can make a dispel check to end the spell that conjured that object or creature (returning it whence it came) in addition to attempting to dispel spells targeting the creature or object.

You may choose to automatically succeed on dispel checks against any spell that you have cast.

Counterspell
When Dispel Magic is used in this way, the spell targets a spellcaster and is cast as a counterspell. Unlike a true counterspell, however, Dispel Magic may not work; you must make a dispel check to counter the other spellcaster's spell.