Cards take damage from fighting and from the effects of spells and abilities. Damage dealt to minions accumulates until the end phase, at which time it is healed. Whenever a minion accumulates damage equal to or greater than its power, it dies. Damage dealt to your Avatar causes you to lose life (or lose the game if they were already at Death's Door). Damage dealt to a site causes the player who controls the site to lose life equal to the damage dealt. Damage modification and prevention are described in more detail below, and the 'attack' codex entry provides further details as well. In most cases, there will be zero or perhaps one damage modifier, and it will be easy to determine damage. But in complex cases, follow these steps when applying damage: Determine incoming damage. Declare and immediately apply damage modification from the active player, then the non-active player. Declare and immediately apply damage prevention effects from the active player, then the non-active player. Note that replacement effects and prevention effects don't use the storyline, which is why they are immediately applied as soon as they're declared.
Damage can be modified in a variety of ways: Increase damage, e.g. Lance. Double damage, e.g. Critical Strike Set damage, e.g. Golden Harp Redirect damage, e.g. Sir Gawain Note that damage prevention effects (e.g. Shield Maidens) including damage immunity (e.g. Tufted Turtles, Lava Salamander) are separate and apply after all damage modification effects. Damage prevention effects use the word 'prevent' or 'immune,' or the phrase 'takes less damage.' See the Preventing Damage section below for more details. Damage modification effects, including all those listed above, are replacement effects and are all handled the same way. Specifically: In the order of their choice, the active player declares and immediately resolves all of their damage modification effects, including from sources they own and no one controls (e.g. a Mask of Mayhem controlled by no one). Note that replacement effects do not use the storyline, and thus these effects are immediately resolved as soon as they are declared. In the order of their choice, the non-active player does the same thing. Each replacement effect can only be applied at most once per instance of damage. For example, if you have two Sir Gawains (perhaps via Selfsame Simulacrum), each Sir Gawain can redirect to themselves once, but they can't use their ability a second time on the same instance of damage. After applying all the damage modification, proceed to damage prevention.
Damage prevention uses the words 'prevent' or 'immune,' or the phrase 'takes less damage,' and applies after all other damage modification. Examples include: Takes less damage, e.g. Shield Maidens. Prevent damage, e.g. Goswhit Helmet, Ward. Immune to damage, e.g. Lava Salamander. After applying all damage modification effects, then apply damage prevention effects in the same way: In the order of their choice, the active player declares and immediately resolves all of their damage prevention effects, including from sources they own and no one controls. Note that prevention effects do not use the storyline, and thus these effects are immediately resolved as soon as they are declared. In the order of their choice, the non-active player does the same thing.