What is this "categorical imperative" that is associated with Kant? It is, simply, a moral rule that must be followed regardless of circumstances. Kant notes that philosophers and theologians have tended to start with the "summum bonum," or highest good, and derive morality from that: pursuing the summum bonum is good. The problem with that approach is that there is no way to tell what is good in any particular circumstance; it all depends on whether it would benefit the highest good. Kant believes that this undermines true morality. "Thou shalt not kill" should be a universal rule, and not something that you make exceptions for: well, it is Hitler, he will kill a lot of other people if we don't; it is in self-defense; etc. I can't say that Kant would endorse this particular rule, nor any other particular rule, because he remarkably avoids discussion of any specific moral laws in the whole book. Nevertheless, this is clearly the gist of what he is saying. If you have to stop and consider the circumstances before knowing if an action is moral or not, you're not using a true morality that is based on universal rules, but a circumstantial one that is based on whether the outcome of your actions.
I have to admit that Kant's argument sounds convincing in the abstract. In practice, I can't imagine a rule so universal that I would want applied regardless of circumstances. If someone is trying to kill me or a member of my family, I wouldn't hesitate (morally, anyway) to kill that person in self-defense. I would consider it almost insanely immoral not to use whatever force was at hand to resist. And if killing is not a universal standard, it's hard to think of what else could be. I am reminded of St. Augustine's story (I can't remember which work, I think it was "City of God") of a woman who violates her chastity three times for good ends. They are all, if I recall correctly, related to saving her husband. So even Augustine, who recounts this story favourably, seems to think that rules are not absolute. You could say that there is an absolute rule to follow God, but unless you can distill it into a maxim that can be stated in universal terms, it will not suit Kant's requirements for the categorical imperative.
This book seems largely a follow-on to the "Critique of Pure Reason," where Kant brought up three "antinomies" of pure reason: the freedom of the will, the immortality of the soul, and the existence of God. None of these, he felt, could be resolved satisfactorily by pure reason. Reason tells us that everything has a physical cause, so how can we have free will that initiates actions without a cause in the physical world? I found Hume's answer thoroughly unsatisfying: we don't have free will, but we act as though we do. Unfortunately, I'm not sure Kant's is much better in the end. He basically says that we must have free will because we feel that we do. In some cases he speaks of free will as a "postulate" of practical reason, i.e. we must base our behaviour around this principle even though we can't prove it through reason alone. But in other cases, he talks about the "proof" of free will, and even says that it is an "apodeictic certainty." I don't at all understand how he gets from one point to the other.
Kant then introduces the two antinomies of practical reason. If (as he supposes) we know we must follow moral rules, and we know we can never attain perfection in them, the only way the system makes sense is if we have an eternity to improve -- hence the immortality of the soul. Moreover, the highest good isn't just being moral, it must also include being happy. (He seems to infer this from the fact that everyone wants to be happy and acts to promote his own happiness.) But it would be a coincidence of cosmic magnitude if following moral rules happened to lead to personal happiness. The only way we can be sure of this is if someone is in charge of creation and dictated that morality and happiness would necessarily coincide -- hence the existence of God. I'm probably butchering his logic here, and to be honest I found it extremely difficult to following his reasoning in this part. I can understand how you might insist on going on these assumptions, but, again, Kant treats them as proofs, which doesn't make sense to me. I understand that they are "practical" rather than theoretical proofs, but the difference escapes me.
For a book that is basically abstract -- as I mentioned, he doesn't bring up any specific instances of rules that would apply to the categorical imperative, and he is mainly concerned with proving its necessity and its implications -- the "Critique of Practical Reason" has a surprisingly practical inclination in places. It contains an ongoing thread about how people other than philosophers approach moral issues, and the entire last section is devoted to a sort of pedagogy of morals. Kant believes that people have a developed innate sense of moral rules and that it is only necessary to direct them in the right way of thinking about them. The wrong way would be to emphasize heroic moral acts, particularly those involving self-sacrifice, such as rescuing people from a sinking ship. Such an act would have a moral element, but it would violate the basic principle of self-preservation to no purpose. Also, any public act would entail a degree of recognition that would be at odds with true moral feeling. Much better to emphasize private decisions that have nothing riding on them than the upholding of the moral code.
Kant devotes considerable effort to showing that moral rules followed for any other purpose than the mere fact that they are rules that we know in our reason we should obey would not have the same meaning. This means that doing something to avoid punishment is not really a moral act, so compulsion detracts from morality. Doing anything for our own benefit, whether public recognition, financial reward, or to get into heaven, would be equally "amoral." The only allowed justification is that we know rationally that we should follow the rule. While I follow his reasoning here, I have also become a quite practical person myself and I think the best way to promote good behaviour is to think of it as a personal benefit. If I can see the good things that will possibly derive to me from a moral action, it is much easier for me to perform that action. It might make the action itself less meritorious, but I should get credit for creating that desire in myself by emphasizing the positive side of moral behaviour and downplaying the negative consequences. I doubt Kant would agree with me, but then, what would he think about someone who emphasizes the negative consequences of his own moral decisions in order to increase the value of making the right decision? It seems implicit in rejecting the one that you would have to accept the other, but it seems equally obvious that, if everyone pursued the latter path, we would have a lot less moral action.