Some units have a natural resistance to magic, or they are protected from hostile magic by magical artefacts they possess.
These often add Dispel dice to attempts to counter any spells. These dice may be used on their own as well - for example a unit may carry a magic standard which gives two Dispel dice against any spells which affect the unit. These can either be used on their own against any spell targeted against the unit, or in combination with Dispel dice from Wizards or other sources.