When you make a concentration check, you roll d20 and add your caster level and the ability score modifier used to determine bonus spells of the same type.
You must make a Concentration check whenever you might potentially be distracted (by taking damage, by harsh weather, and so on) while casting a spell.
If the Concentration check succeeds, you may continue with the action as normal. If the check fails, the action automatically fails and is wasted. If you were in the process of casting a spell, the spell is lost (see Casting spells). If you were concentrating on an active spell, the spell ends as if you had ceased concentrating on it. If you were directing a spell, the direction fails but the spell remains active. If you were using a spell-like ability, that use of the ability is lost.
The table below summarizes various types of distractions that cause you to make a Concentration check. If the distraction occurs while you are trying to cast a spell, you must add the level of the spell you are trying to cast to the appropriate Concentration DC. If more than one type of distraction is present, make a check for each one; any failed Concentration check indicates that the task is not completed.
Table: Concentration Check DCs
Situation
Concentration Check DC
Cast defensively
15 + spell level
Injured while casting
10 + damage dealt + spell level
Continuous damage while casting
10 + 1/2 damage dealt + spell level
Affected by a non-damaging spell while casting
DC of the spell + spell level
Grappled or pinned while casting
20 + spell level
Vigorous motion while casting (such as being mounted)
A character with the Combat Casting feat gets a +4 bonus on Concentration checks made to cast a spell or use a spell-like ability while on the defensive or while grappling or pinned.