Hume felt that it is impossible to bring up impression that a person never felt or experienced before. Thus it is wrong for us to say that one event caused another event or that events are interrelated. The reason that human beings believe in cause and effect is due to the brought up which based on the conjunction of the events or reality. Through Critique of Pure Reason, Kant divined the understanding of knowledge into two; a priori and a posteriori.
Knowledge can be independent from experience and all sense impressions (a priori), and can also need to have experience of impressions (a posteriori). Humes believed that habit makes human see causality and from constant conjunction of causes and effects, human beings learn to see it as a necessary connection. Kant agrees that causality is just there, but it is an a priori concept of understanding the knowledge. The concept of causality is accustomed, and experience derives from such pure concepts, and these concepts and intuitions shape humans world yet tell nothing about things in them.
The concept of causality cannot be performed in an empirical way. Kant declared the transcendental aesthetic is the first stage of minds experience. He stated that all sense experience is synthesized through the concepts of time and space. Space stands for itself and does not represent anything in it; however it is perceived in a subjective condition. Human subjectively perceive time as in the reality of time. Kant did not see space and time as worlds properties, but as a general concept given to the human mind.
The next step of mind activity is the transcendental analytic, applies categories to the mind, which without the categories human would not be able to think at all. They are; quantity (unity, plurality, totality), quality (reality, negation, limitation), relation (substance and accidents, cause and effect, reciprocity between active and passive), modality (possible-impossible, existence-nonexistence, necessity-contingency). The transcendental dialectic comes last. He mentions that it is minds process in understanding matters that lie beyond humans experiences such as God or super natural elements.
The reason is that mind requires detailed information about an object which exists in sensory world; such information about non-material object puts mind at a limitation of understand only the physical world which it can only perceive. Kant mentions that God cannot be proved empirically. Instead faith or belief is necessary to keep the society running (the existence of good or bad, the life after death). For Hume the religion or belief were nothing more than superstitions.
Reference: Barry Stroud, Hume. Routledge, 1977. Diane Morgan, Kant Trouble: The Obscurities of the Enlightened . Routledge , 2000.