SPELL RESISTANCE
When a spell is cast against a creature or player, the spell must overcome that target's natural resistance to spells. The caster must succeed a roll against the target's spell resistance or the spell simply fizzles. In past times, this was referred to as magic resistance, but in our game magic resistance and spell resistance are one and the same.
The roll against spell resistance is as follows:
D20 + spell penetration VS spell/magic resistance number
So, if you had 4 spell resistance without any other modifiers from yourself or the caster, you would have a 20% chance to resist the spell.
Modifiers include : Resistance feats, Spell penetration feats, racial bonuses.