Yes, only spell resist causes spells to be "resisted" (shows in text above character) and only spell mastery helps prevent those resists.
Elemental and physical damage can also be partially mitigated using the stats like "cold resistance", in all those cases it is a percentage of the damage being mitigated. 100 or higher of one of those resistances means you ignore all damage from that type. You can also have negative values, meaning you take more damage from those types.
Let's say you have a firedart spell that can be resisted. First, the game checks spell mastery vs spell resist. The chance for a spell to HIT (not be resisted) is (caster's spell mastery) - (target's spell resist) percent.
Then, if the spell hits, it does a normal damage roll for the amount the spell hits for, and removes a portion equal to (target's fire resistance) percent.