According to Kant, we should all "Act only in accordance with that maxim through which you can at the same time will that it should become a universal law."
An example of a maxim would be "I will wear a jacket because it is cold outside." It is not the action of putting on the jacket, it is the reaction to fulfill some purpose.
Thus, to act morally, our maxims must be "universalizable." This is an abstract concept, but what Kant means by it is that if you were to apply that maxim across the world to every person, no contradictions in your will to exist in the world of the universalized maxim would arise. This idea of contradictions is simple with basic maxims such as the example I have provided, but it gets far less so when dealing with common moral concepts.
For instance, according to the idea of the categorical imperative, the maxim "Lying gets me what I want" would be immoral, because if one were to extend that maxim universally, a contradiction would arise. You would not desire to exist in a world where you were universally lied to for personal gain.
This sounds an awful lot like the golden rule inherently, but do not confuse them. Moral actions, according to Kant, treat other humans as an end, not as a means. For example, it is immoral to steal from someone because you are using them as a means for which you can procure wealth, however, it is moral to purchase something form someone because you are using them as an end.