The one thing in the world that is unambiguously good is the "good will." Qualities of character (wit, intelligence, courage, etc.) or qualities of good fortune (wealth, status, good health) may be used to either good or bad purposes. By contrast, a good will is intrinsically good--even if its efforts fail to bring about positive results.
It is a principle of the composition of natural organisms that each of their purposes is served by the organ or faculty most appropriate to that purpose. The highest purposes of each individual are presumably self-preservation and the attainment of happiness. Reason does not appear to be as well suited as instinct for these purposes. Indeed, people with a refined capacity for reason are often less happy than the masses. As a result, refined people often envy the masses, while common people view reason with contempt. The fact is that reason serves purposes that are higher than individual survival and private happiness. Reason's function is to bring about a will that is good in itself, as opposed to good for some particular purpose, such as the attainment of happiness.
The specific obligations of a good will are called "duties." We may make three general propositions about duty. First, actions are genuinely good when they are undertaken for the sake of duty alone. People may act in conformity with duty out of some interest or compulsion other than duty. For instance, a grocer has a duty to offer a fair price to all customers, yet grocers abide by this duty not solely out of a sense of duty, but rather because the competition of other grocers compels them to offer the lowest possible price. Similarly, all people have a duty to help others in distress, yet many people may help others not out of a sense of duty, but rather because it gives them pleasure to spread happiness to other people. A more genuine example of duty would be a person who feels no philanthropic inclination, but who nonetheless works to help others because he or she recognizes that it is a duty to do so.
The second proposition is that actions are judged not according to the purpose they were meant to bring about, but rather by the "maxim" or principle that served as their motivation. This principle is similar to the first. When someone undertakes an action with no other motivation than a sense of duty, they are doing so because they have recognized a moral principle that is valid a priori. By contrast, if they undertake an action in order to bring about a particular result, then they have a motivation beyond mere duty.
The third proposition, also related to the first two, is that duties should be undertaken out of "reverence" for "the law." Any organism can act out of instinct. Chance events could bring about positive results. But only a rational being can recognize a general moral law and act out of respect for it. The "reverence" for law that such a being exhibits (this is explained in Kant's footnote) is not an emotional feeling of respect for the greatness of the law. Rather, it is the moral motivation of a person who recognizes that the law is an imperative of reason that transcends all other concerns and interests.
Since particular circumstances and motivations cannot be brought into the consideration of moral principles, the moral "law" cannot be a specific stipulation to do or not do this or that particular action. Rather, the moral law must be applicable in all situations. Thus the law of morality is that we should act in such a way that we could want the maxim (the motivating principle) of our action to become a universal law.