No, it isn’t about counterspelling
Defensive Spellcasting
A good many times in the life of an adventuring spellcaster will be better handled through defense than offense. And what good will hurling flame and lightning and acid do you when you’re on the receiving end of a battleaxe to the head, anyhow?
There are two primary means by which you can use spells to directly prolong your life during violent situations. Damage Avoidance and Damage Absorbtion. A combination of these two can make fighting you quite a frustratign experience
-
Damage Avoidance
Both Arcane and Divine spell lists abound with Damage Avoidance spells, though not always the same ones.
Mage Armor, Shield, Shield of Faith, and Magic Vestment all make you significantly more difficult to strike in combat.
Spells such as Minor Globe of Invulnerability or Spell Resistance make for excellent Damage Avoidance mechanisms in regards to magic as well.
When selecting Damage Avoidance magics, it is of great importance to keep in mind how your magic will stack. It does little good to cast Protection from Evil for the AC bonus if you already have a Shield of Faith providing a Deflection bonus of equal or greater value. Of course, Protection from Evil has other benefit that shouldn’t be ignored (hedging out.
-
Damage Absorbtion
Stoneskin is the classic Damage Absorbtion spell, and I have seen it commonly banned from 2nd Edition games due to its extreme efficiency. The 3rd edition variant is a bit more even-keeled, though.
Endure and Resist spells are lovely for this purpose as well, and are accessible to a variety of spellcasters.
Stacking isn’t so much of an issue when using magic to absorb punishment, and these are lovely spells to use on your favorite Fighter buddy that would otherwise spend a lot of time roasting in his own juices when an opponent mage gets happy with a Wand of Fireballs or somesuch