While all attacks deal damage, not all attacks do so in the same way. Each attack deals specific kinds of damage, and although EV and SH allow you to avoid or deflect attacks entirely, different defenses are required to protect against attacks that actually hit you.
Physical damage is the most common kind of damage in the game. Almost every monster deals it with their base attacks, and many Earth Magic spells deal it as well. Physical damage is reduced by an amount ranging from 0 to the target's AC, and is further reduced by the target's GDR if the source of the damage is melee combat.
Fire damage is usually caused by spells and abilities, but certain weapon brands also cause it. Along with dealing damage, fire may also destroy scrolls in your inventory. Fire resistance protects against it, while conservation reduces the chance of scroll loss by 90%. Note that melee attacks that deal fire damage (either from a branded weapon or a monster with a natural fire attack) are an exception to the chart below: the fire component of the attack deals 200% damage to vulnerable foes, instead of 150%.
A few spells deal lava damage, a hybrid of fire (55%) and physical (45%) damage. It burns scrolls just like normal fire attacks. Fire resistance and AC both affect the damage.
Cold damage is usually caused by spells and abilities, but certain weapon brands also cause it. Along with dealing damage, cold may also destroy potions in your inventory. Cold resistance protects against it, while conservation reduces the chance of potion loss by 90%. As with fiery melee attacks, cold melee attacks are also an exception: their cold damage component deals 200% damage to vulnerable foes, instead of 150%.
A few spells deal ice damage, a hybrid of cold (40%) and physical (60%) damage. It shatters potions just like normal cold attacks. Cold resistance and AC both affect the damage.
Negative energy damage is the result of many Necromancy spells, some undead monster attacks, and certain weapon brands. Some of these attacks have an additional draining effect, reducing a player's experience or a monster's HD. Life protection resists both the damage dealt and the XP loss. Undead and demonic monsters are naturally immune to it, as are undead players.
Torment damage is a particularly devastating kind of negative energy, caused through a wide variety of evil sources. It normally deals damage equal to half the HP of the target, but this percentage can be reduced in a number of ways. See the torment article for details.
Acid damage is caused by the attacks of certain monsters and a few abilities. The amount of acid damage dealt by acid attacks is affected by two things: the acid resistance of the target and the number of armour equipment slots the target is wearing something in. Every open equipment slot magnifies the damage dealt by acid attacks (but wearing a cloak gives each slot a 50% chance to be considered full). Acid damage also may cause corrosion of your weapons and armour, temporarily reducing their effectiveness (either AC or Slaying as factors) by a value of 4 per stack.
Poison damage is normally caused by being poisoned, though some poison attacks also deal immediate poison damage on their own. Poison usually occurs as the result of a monster attack, though many Poison Magic spells, certain brands, and poisonous chunks can also cause the condition. Poison resistance makes it nearly impossible to become poisoned, and reduces damage taken immediately from poison attacks as well as the damage over time the poison condition causes. Undead and demonic monsters are naturally immune to it, as are undead players.
The Poison Arrow spell causes hybrid damage, dealing both poison (70%) and physical (30%) damage. Unlike normal poison attacks, it can override poison resistance and still inflict the poison condition on anything but the undead or demons. Poison resistance and AC both affect the damage.
Steam damage is caused by a variety of monster abilities and spells, as well as steam clouds. Steam resistance provides complete immunity to steam damage, but the clouds will still block your line of sight.
Smiting attacks are the result of divine or infernal wrath directed against the target. They don't do much damage, but they are completely unavoidable and there is very little one can do about it; at present, only the unique damage reduction granted to deep dwarf characters can reduce smite damage.