According to Carl Gustav Jung, many people may consider they know everything about psychology, because they think it is nothing more than what they know about themselves. In the introduction to his book entitled The Image of Man and the Image of God, he gave his own definition of religion, or rather what he understands by this word. According to him, it is an attentive and conscious observation of what Rudolf Otto named "numinosum". This means a dynamic experience or effect that is not caused by an act of human will. On the contrary, this effect dominates the human subject, who is most always rather its victim than its creator. No matter what the cause of the numinous, it is independent of the individual's personal will.
Jung says that following the general rule, both the religious doctrine and the collective consciousness (or the so-called "consensus gentium"), has to be attributed to a cause that is external to the individual. So, the numinous is the quality of a visible object, or the influence of an invisible presence, which generates a radical change within the human conscience.
There are, however, some exceptions. When it comes to religious practices and rituals, a lot of ritualistic acts are performed only for the purpose of intentionally producing the effect of the numinous by some magical artifices such as the invocation, meditation and other yoga practices, self-punishment in different ways, etc. But, having faith in the divine power always precedes these practices and rituals. For instance, the Catholic Church provides its believers with the sacraments, in order to give them spiritual blessing. But, because this may imply the idea of constraining the presence of the holy grace by a most obviously magical means, this is the logical argument explaining the relationship between sacraments and divinity: nobody could ever constrain the divine grace to be present in the sacramental acts, but still it is present there, because sacraments are divine institutions. God wouldn't have established holy sacraments if he didn't want to support them.
Religion is, typically, a human attitude. Jung states that it may be seen as a very careful and thorough observation of certain dynamic factors, which are perceived as spiritual powers such as spirits, demons, gods, laws, ideas, ideals, or so many names that man has given to those factors, which people have experienced in their very own universe, and which they have considered powerful enough, evil or good to treat them with plenty of attention and study. Those factors can also be considered as beautiful and kind enough for humans to adore or worship them in a religious manner. Indeed, there is an English expression saying, "he is almost religiously devoted to his cause."
As for religious confessions, he defines them as some codified and dogmatized forms of original religious experiences. And although, for instance, the Catholic Church is often accused of rigidity and unwillingness to accept any doctrinal changes, it still admits that dogma is alive, and by its essence, it can be prone to change and evolution.
In his previously mentioned book, Jung tries to explain how this religious apparatus is deeply rooted into the human spirit and how people's minds react and try defending themselves against often imaginary dangers. People feel a sort of primitive fear toward the unknown contents of their own subconsciousness. Apart from any natural and normal fear or delicacy, there is the fear of the perils of the soul. Of course, people may feel embarrassed to admit such a ridiculous type of fear, which does not seem to have any basis in the real world. The thing is we can never be sure that we won't be conquered in our own minds either by a new idea/doctrine, and this, according to the Swiss psychologist, results in a clash between our own reason and the fascination with the world of ideas. But, the real danger may lie in the fact that certain ideas and ideologies may possess the human mind to the extent of killing others in the name of those ideas. It is this fear of the unknown, the uncontrollable, that may cause humans to become that much aggressive.