Spell failure occurs when spellcasting is attempted in conditions where the requirements of the spell cannot be fully matched, the casting fails and the spell is wasted. The failed spell's associated spell slot or use per day is considered to be used.
This is in contrast to some conditions that prohibit the casting of spells. For example, a silenced character cannot even attempt to cast a spell with a verbal component, so a spell slot is not consumed.
Spell failure occurs when the caster fails his or her concentration check that is required when the caster is distracted in some manner during casting (e.g. incurring damage) or when casting defensively. Spell failure in this manner is guaranteed and can affect both divine and arcane spellcasters.
A caster who fails his or her concentration check against a taunt incurs a 30% chance to fail any spell he or she casts for five rounds. This affects both types of spellcasters.
Arcane — but not divine — spellcasters receive a chance of spell failure when wearing armor or wielding a shield that has a (percent) value for arcane spell failure. These percentages are combined to obtain the chance of arcane spell failure which is then added to the chance of failure from being taunted (if applicable) to obtain the total chance of spell failure. This arcane spell failure can be reduced by a property on the worn armor or shield, and it only applies to arcane spells with somatic components. (In particular, stilled spells are not subject to arcane spell failure.)
A deafened arcane spellcaster incurs a 20% chance to fail any spell he or she casts that is not cast with still spell.