Damage types are used to determine how easily a target resists damage of that type based on their Damage Reductions. A creature or suit of armor may be very resistant to one type of damage but quite vulnerable to another.
Some weapons or attacks may do multiple damage types or list an "or" between their damage types. When an "or" is listed, the attack will always do the damage type that the target is most vulnerable to. Raw damage is the only damage type that ignores all Damage Reductions and is generally associated with poisons and similar effects.