Difference between hypothetical imperative and categorical imperative
Imperatives are formula of a reason that determines the will of the action. Imperatives can be expressed in terms of what ought to do. All imperatives are communicated by doing an action conferring to the standard of a will that it will provide a good ending in anyway. If the end action is good, as a mean to something it is hypothetical imperative. On the other hand, if the action is good according to itself than it is considered a categorical imperative.
Kant holds that a categorical imperative is the fundamental principle of our moral duties because it is a command that exercise our wills in a particular way, not to perform some action or other. It is categorical in nature because we possess rational wills, without reference to any ends that we might or might not have.
A hypothetical imperative is a command that also applies to us in virtue of our having a rational will, but not simply in virtue of this. It requires us to exercise our wills in a certain way given we have an origin willed an end. A hypothetical imperative is thus a command in a conditional form.