There's 3 variables : pierce, hack and crush . Each unit has an amount of p,h,c for attack and for armor.
example
Buildings : Far far more 'pierce' armor than 'crush' armor
Catapults : Lots of 'crush' attack ,
Archers : Lots of "pierce' attack ,
---> use a catapult vs building