Ninja Pigmen are Passive mobs that you can tame by giving them a sword. When you attack a mob with a tamed Ninja Pigman, the Ninja Pigman starts violently attacking the mob.
Ninja Pigmen also tend to become more aggressive and impatient over time if not given a sword, and can become deadly if they become too impatient with the player.
Furthermore, they will only except iron swords, stone swords, or diamond swords, making it harder to get them a satisfied.
They do use the durability bar on their swords, so they will break after they use them enough. If you do not give them a sword after theirs breaks soon enough, they will become untamed and hostile and attack.