Spell Resistance
Spell resistance allows you to shrug off magical effects, even if they are not directed specifically at you. If a spell would affect you, the caster must make a Knowledge (Magic) check against a DC equal to your spell resistance. If they do not make or beat the DC, the spell has no effect upon you. If they succeed the spell continues as normal.
You do not have to be aware of the spell to resist it - even unconscious or disabled creatures continue to have spell resistance in effect. You can, however, allow magical effects to target you if you are aware of them and wish to lower your resistance.
Spell resistance may be bypassed if one is creative enough - using magic to throw a boulder at your target will be unaffected by their spell resistance, for example.
Spell resistance does not stack, it overlaps.