Spell attack modifier is what you add to spell attacks when trying to hit a target
In the same way that a non-magic class would roll strength or dexterity to make an attack, a caster uses their primary casting ability to try and hit the target. Which stat you use depends on which class you play (the rule book tells you in your class section). The result is compared to the target's AC. If you equal or tie the AC value, you hit and the spell has whatever effect it describes.
Spell Save DC is what foes must roll to avoid your spell effects.
If you cast a spell that requires a target to make a saving throw, the DC is what they need to roll (after adding their stat mod) to avoid or reduce the effect of the spell. Like rolling to hit, if their save equals or exceeds the value of your spell save DC, they pass and the spell's effect is reduced (often, a success will mean the target takes half damage instead of full damage).
A spell will either tell you to make a spell attack or direct your targets to make a [stat] saving throw. This is how you know whether you are rolling to hit the target or if the spell automatically "hits" but the target gets a chance to resist the effect.