The Ethics of Duty: Deontology
There are two principal answwers to the question of how we ought to act. One of these (consequentialism) says that we ought to add up the positive and negative consequences of our possible actions and perform the action that produces the greatest overall amount of good. That approach is covered in our page on consequentialism.
The other main way of answering this question is to say that we ought to follow the appropriate rules, that we ought to do our duty. This approach is most frequently associated with the philosopher Immanuel Kant, and philosophers refer to this general position as deontology. (This word comes from the Greek, deon, which means duty. Although this word is not commonly used in English outside of philosophical circles, the corresponding word occurs more frequently in other European languages such as French.) Deontological approaches have this in common: the right course of action *our duty) determines what is good. In contrast, consequentialist approaches maintain that the good (consequences) determine what is right.
Deontological approaches remain alive today. In political philosophy, the Harvard philosopher John Rawls developed a powerful theory of justice that was fundamentally deontological in its inspiration. Many religious traditions maintain that duty determines what is good, and typically they see our duty as being determined by God's will as revealed through various texts and institutions. We often see the ethics of duty in military contexts as well, where it is important to do the right thing, whatever the consequences.