Armor is an item introduced in the 0.6.0 update. Armor is used to lower the amount of damage taken when worn.
When you put on armor, you are given Defence Points (like hearts but with armor) which are displayed in the top left next to hearts. The more you have - the less amount of damage you will take when attacked.
The maximum amount of defence points you can get is 20 (10 armor icons) which is only possible with a full set of diamond armor.
1/2 of Armor (icon) = 1 Defence Point
1 Whole Armor (icon) = 2 Defence Points
From the weakest to the strongest - the order is as follows:
It is possible to obtain chainmail armor via an inventory editor.
Helmet = 5 ingots/pieces
Chestplate = 8 ingots/pieces
Leggings = 7 ingots/pieces
Boots = 4 ingots/pieces
In the PC Minecraft, Chainmail Armor can be crafted from unobtainable Fire Blocks (which have to be hacked or modded into the game), providing armor that is slightly stronger than gold or leather, but it is rumored you can obtain chainmail by trading with villagers.