In StarCraft, there are several damage types. The actual damage done depends on the type and the size of the target unit. All buildings are "Large" units.

Damage type
SizeConcussionNormalExplosive
Small100%100%50%
Medium50%100%75%
Large25%100%100%
However, if a unit is Shielded (Protoss units only), the shield takes full damage from any attack, regardless of the unit's size.

Some attacks also do splash damage - enemy units near the target are also affected. These are usually (not always) powerful Normal or Explosive attacks. With the exception of the Siege Tank and the Infested Terran, splash damage does not affect your own units (but it will affect your allies' units).