Each protection spell in Minecraft increases the damage reduction of an armor piece.
For example, players can use magic to reduce damage from Ender Pearls, something armor would not normally protect them.
However, protection does not protect players from certain sources such as the /kill command, starvation, or sonic boom attacks fired by wardens.
Protection and its variants work on a percentage-based formula. Specifically, the formula is (4 x magic rank)% for each armor piece to which the spell is applied.