Minecraft wiki entry for Enchanting_mechanics, associated text: An item with multiple copies of the same enchantment uses the level of the first copy of that enchantment in the list.
For armor with conflicting protection enchantments, all enchantments take effect individually.
For weapons with conflicting damage enchantments, all enchantments take effect individually.
For tools with both Silk Touch and Fortune, Silk Touch takes priority over Fortune on blocks affected by both enchantments. Fortune still applies to blocks such as crops that are not affected by Silk Touch.
For bows with both Mending and Infinity, both enchantments work individually.
For tridents with both Loyalty and Riptide, Riptide still functions normally but the trident can no longer be thrown by the player. However, tridents can still be thrown using dispensers.
For crossbows with both Multishot and Piercing, both enchantments work individually.