The Yogacara School thinks that everyone has a mind continuum from beginningless time until the attainment of enlightenment. This mind continuum sometimes has the five consciousnesses of eyes, ears, nose, tongue and body, but sometimes not. No matter how it manifests itself, a permanent existence called the Alaya Consciousness is present at all times. Whenever karma is committed, a karmic seed will be planted in the Alaya Consciousness.
There is an analogy for this. When ink is poured on the snow, the snow will be turned into ink color. After it melts, the color can still be seen on the ground. Similarly, if karma is born of defilements, the karmic mark will be left in the Alaya Consciousness after defilements are gone.
~ Depicted from Luminous Wisdom Book Series 1