Holy Duty does damage, and causes the user to faint. It has the same effect as Explosion.
If Holy Duty is used against a substitute or a Pokémon that has used Protect or Detect, the user will still faint. The Focus Band, Focus Sash, and Sturdy won't prevent the user of Holy Duty from fainting.
Holy Duty cannot be used when a Pokémon with the ability Damp is on the field.