Armor reduces damage taken by the hull. All ships and structures, from the tiniest fighters to the mightiest titans, have armor, and the armor of all ships can be improved through research. Through research, the TEC can cheaply upgrade their armor quite a lot; Vasari armor upgrades are more expensive and less extensive, and the Advent have only a few expensive late-game armor upgrades. Shield damage taken is not affected by armor; it only affects hull damage and hence only comes into play once shields are down, or if they are being bypassed by Phase Missiles.
Armor reduces damage taken by the hull, based on this formula: [20/(20 + Armor)]x100%. ex: Assume armor is 2. 20 + 2 = 22, 20/22 = 0.909, damage taken is 91% of normal (ie 91 instead of 100)
Armor effectively increases hull points and repairs done by 5% per armor point. As such, it stacks multiplicatively with hull bonuses (+2 armor points and +10% hull points effectively provides 1.1x1.1 = 1.21, or 21% increase in hull points). With the maximum +8 armor from TEC (armor pact + top research) and their 30% bonus to hull strength, TEC ships gain an effective 1.3 x 1.4 = 82% increase in hull points, plus 364 bonus hull points).
Note however that every point in armor not only increases internal hull repair (as hull research does), but also external repair - the effectiveness of a Repair Platform or a hull repair ability (such as the Hoshiko's Repair Drones) is increased by 5% for every point of armor, meaning that the amount of firepower undone by repairs is greater for more heavily armored vessels. This in part makes up for the fact that hull repairs are significantly slower than shield regeneration.
2 armor increases effective hitpoints by 10%... so it takes 91% of normal damage. (multiply .9111 times 1.10 to get 100%)
5 armor increases effective hitpoints by 25%... so it takes 80% of normal damage (multiply .80 times 1.25 to get 100%)
10 armorincreases effective hitpoints by 50%... so it takes 66% of normal damage. (multiply .6666 times 1.5 to get 100%)
20 armor increases effective hitpoints by 100%... so something would take 1/2 the damage it normally would.
30 armor (only a tricked out space turnip or Ankylon Titan can get this) increases effective hitpoints by 150%... so it takes 40% of what it normally would.
The formula for damage percentage taken by the hull of ship (after Shield Mitigation has been accounted for) is [20/(20 + Armor)]x100%.