Magic resistance increases your character's chance to mostly block magical attacks. It negates incoming damage before it hits your character, and remaining damage is subsequently passed on to your direct resistances.
These resistances negate damage directly rather than relying on chance, similar to how armour absorption works. For example: With 2 fire resistance, any incoming fire attack does 2 less damage. Resistances will not heal your character by causing negative damage, but rather display that the attack is ineffective.