The categorical imperative is a moral principle developed by the philosopher Immanuel Kant. It suggests that we should act only according to maxims that we would want to become universal laws. In simpler terms, before making a decision, we should ask ourselves if we would want everyone to act in the same way. This helps ensure our actions are ethical and fair.
For example, if you consider lying to get out of trouble, the categorical imperative would prompt you to think about what would happen if everyone lied in similar situations. If that would lead to chaos, then lying is not a morally acceptable choice.