The Metaphysics of Morals by Immanuel Kant Chapter 2 Page 24

relation of objective laws of all volition to the subjective imperfection of the will of this or that rational being, e.g., the human will.

Now all imperatives command either hypothetically or categorically. The former represent the practical necessity of a possible action as means to something else that is willed (or at least which one might possibly will). The categorical imperative would be that which represented an action as necessary of itself without reference to another end, i.e., as objectively necessary.

Since every practical law represents a possible action as good and, on this account, for a subject who is practically determinable by reason, necessary, all imperatives are formulae determining an action which is necessary according to the principle of a will good in some respects.