Kant follows this train of reasoning to its remarkable conclusion: we enjoy at least some measure of freedom in the operation of our will. This freedom means doing what we want to do or what we ought to do, as opposed to what we have to do. Freedom implies autonomy, which Kant distinguishes from subservience to natural inclination. So at least some of what we think and do is not governed by the necessity imposed by the laws of science. If I give a dollar to a man on the street, the movements of our bodies are determined by nature, but my choice to give and his choice to take are free decisions that we both make.
It follows that there is an aspect of our humanity that belongs to the world of science, and there is an aspect of our humanity that is outside the reach of scientific laws. Simultaneously, we inhabit the realm of the phenomenal, which is the material realm, and also the realm of the noumenal, which is the realm of freedom. It is the noumenal realm, the realm outside space and time, that makes possible free choices, which are implemented within the realm of space and time. Materialism tries to understand us in two dimensions, whereas in reality we inhabit three.
To some, it may seem fantastic that all nature should obey fixed laws but a single type of animal, hairy, omnivorous, and bipedal, should be able to act in violation of these laws. But there is, and we are that animal. Moreover, we have discovered with the help of Kant that the material world is not the only world there is, and that there is a higher domain we rely on in every free choice we make. We have shown, in other words, that materialism is wrong, and contrary to its dogmatic assertion, there is a ghost in the machine, which we may for convenience term the soul.