In Buddhism, we talk about the Eight Consciousnesses which are generated when our senses encounter their objects: 1) consciousness of sight, 2) consciousness of hearing, 3) consciousness of smell, 4) consciousness of taste, 5) consciousness of touch, 6) consciousness of mind, 7) impure (mind) consciousness, 8) the alaya (storehouse) consciousness.
The consciousness of mind integrates the perceptions of the five senses in concrete images and takes decisions concerning the exterior world.
The impure (mind) consciousness is the source of clinging and so the origin of the sense of ego as well as of the other illusions which are born from the fact that a person takes as real something which is merely apparent.
The alaya consciousness or storehouse consciousness is the place where all the actions and experiences in this life and the previous lives generated by the seven consciousnesses are stored as karma, being the only consciousness which comes along with every birth. This consciousness influences at the same time the workings of the other seven consciousnesses.
The alaya consciousness, never-perishing consciousness, or maintaining-consciousness is the eighth and deepest of the eight consciousnesses; alaya means abode, dwelling, or receptacle. Located below the realms of conscious awareness, it is called the storehouse consciousness, because all karma created in the present and previous lifetimes is stored there. It is also called the never-perishing consciousness, because the karmic seeds preserved there continue even after death, and the maintaining-consciousness, because it maintains the life and body of a sentient being. The alaya-consciousness is regarded as that which undergoes the cycle of birth and death, and determines the nature of individual existence. All the actions and experiences of life that occur through the first seven consciousnesses, such as sight, hearing, touch, and mind, are accumulated as karma in this alaya consciousness, which in turn exerts an influence on the workings of these seven.
We take this alaya consciousness with us in all our births in the various realms of existence. It contains the seeds of various types of karma, and it is the storehouse of the habitual evil karmic tendencies that we have cultivated for eons. Because of the karmic seeds contained in the alaya consciousness one may die a premature death, be stricken with unexpected disease or inexplicable misfortune, overcome by strong desires, aversions and obsessions, can think and do things that one should never even imagine, so strong is the influence of the alaya consciousness.