Spell resistance is a special defensive ability that protects against spells.
Each spell description includes an entry that indicates whether spell resistance applies to the spell (if so, Yes; if not, No). In general, whether spell resistance applies depends on what the spell does:
Targeted Spell: If the spell is targeted at a creature, spell resistance applies. If the spell targets multiple specific creatures, spell resistance applies to those individuals that have it.
Area Spell: If the target is within the area of a spell, its spell resistance applies. The spell resistance protects the resistant creature without affecting the spell itself.
Effect Spell: Most effect spells summon or create something and are not subject to spell resistance. Effect spells that affect a creature more or less directly are sometimes subject to spell resistance.
Level Check: If a spell is being resisted by a creature with spell resistance, the caster must make a level check (1d20 + caster level) and get a result at least equal to the creature’s spell resistance for the spell to affect that creature. If the caster fails the check, the spell doesn’t affect the defender. The defender’s spell resistance is like a Defense score against magical attacks.
(Harmless) and (Object): These terms mean the same thing in a spell resistance entry as they do for saving throws. A creature with spell resistance must voluntarily drop the resistance in order to receive the effects of a spell noted as harmless without the level check described above. Doing so is an attack action that does not provoke an attack of opportunity. Once a creature lowers its resistance, it remains down until the creature’s next turn, at the beginning of which it automatically returns. A creature’s spell resistance never interferes with its own spells, powers, items, or abilities.
Only spells and spell-like abilities are subject to spell resistance. Extraordinary and supernatural abilities (including enhancement bonuses on magic weapons) are not. A creature can have some abilities that are subject to spell resistance and others that are not.
Spell resistance does not stack with power resistance, and vice versa.