Damage is the Bad Stuff caused to constructions by weapons and collisions. Damage is calculated per-module. Once a module's HP has fallen to 0 or below, it stops working and can no longer be repaired. Non-working modules are shown as much darker than normal ones in interior view. When a module reaches -40% HP and is at the edge of the construction, it is destroyed entirely.
When heavily damaged, most modules may catch fire, which will further damage the module, impede operations, and may spread to adjacent modules. Some modules such as ammo stores and many weapons may also explode once they're damaged enough.
Modules are protected from weapons damage by armour, which absorbs damage. Only once the armour is gone does the damage get applied to the module.