The yogic theory of saṃskāras, or subliminal impressions of past painful or pleasurable experiences, is one of India's most fascinating contributions to our understanding of human psychology. Briefly, when we experience aversion to a painful experience, or attachment to a pleasurable one, then an impression of that experience is laid down in our psyche, which is said to be a 'seed' of experience which will sprout again.
In other words, when we are unable to fully 'show up' for any given experience, a remnant of it is deposited in our psyche — or, in Tantrik theory, in the 'subtle body' which is simply the extension of the psyche. The subtle body is said to interpenetrate and underlie the physical body in the sense that it is a model for explaining how unresolved past experiences shape our relationship to the body (and its health) in the present. In Tantrik psychology, a metaphor of digestion is used — when we are unable to fully 'digest' a given experience, part of the 'energy' of that experience is deposited and will need to be digested later, hopefully before it toxifies and thereby distorts our experience of the people and events in the present.
This description is of course oversimplified. In fact, everyone carries around with them a whole host of saṃskāras from this lifetime and previous lives (since the subtle body does not die with the physical one), and those impressions unconsciously shape our preferences and the assumptions we project onto the people and situations we encounter. The stronger the emotional impact of an experience, the deeper the impression that is formed, until we end up with a whole network of impressions that function as a filter to reality. Some of these impressions are 'toxic' in the sense that they are so strong that they create exaggerated fear responses when no threat (or only a mild threat) is present, or create attachments to people or things that are not actually very healthy for us.
By means of this 'samskāral net', we project our past-based assumptions, fears, and expectations on the present-moment situation; thus we are not able to 'show up' for the reality of the situation. Since the goal of yoga may be phrased as 'seeing reality clearly', it is of paramount importance to become aware of, and then dissolve, the samskāras that obscure our vision. Samskāra theory is thus far more important to yoga psychology than the theory of karma. Karma, you might say, simply provides the occasions for us to become aware of the samskāric baggage we are carrying (since our karma will definitely create situations in which those samskāras are triggered), and thereby to become aware of what we need to release.
As a result of spiritual awakening, we become more self-aware, and thus more aware of our saṃskāras and how they are distorting our perception. This allows us to compensate for them — for example, instead of blaming a loved one for an emotion that is arising in the present moment, we can see that they are merely the trigger for the activation of an old saṃskāra, and our language begins to shift from statements like 'You don't care about me' to 'I'm triggered right now, and so I don't feel safe with you, even if I am'. In time, as we come to know ourselves, we learn how to see through the veils thrown up by the saṃskāras and discern the difference between present-moment reality and the emotional remnants of the past.
But of course we also want to dissolve the saṃskāras, because even if we are very self-aware, their emotional strength will always trip us up to some degree. Spiritual practice is said to 'burn the seeds' of the saṃskāras so they cannot sprout again. How does this happen? Three things are required: opening up the body, opening up the emotional core, and self-inquiry. The first is addressed by a physical yoga practice (or other deep somatic work) that opens up pockets of 'stagnant energy' in the body, resulting in emotional release.
The second is addressed by a sitting-still-and-listening practice, a specific kind of meditation in which one creates an open space in which unresolved saṃskāras can arise and be released. I use the Sanskrit term bhāvanā for this kind of meditation in which one lets go of techniques and fascination with altered states (trance, bliss, etc.) and sits with the simple open attitude of "I'm willing to see whatever needs to be seen; I'm willing to feel whatever needs to be felt." This kind of meditation requires cultivation. Probably the best book on it is Ādyashānti's True Meditation, which, though it doesn't mention saṃskāras, describes carefully how to cultivate the kind of practice which allows for their release.
Thirdly, critical self-inquiry (ātma-vichāra) is called for: critical not in the sense of judgmental, but in the sense of a careful inspection of your inner being to make sure that you're not in denial (such as when you think you're 'over' something but really you're not). For this third practice, having a wise teacher, coach, or spiritual friend that serves as a mirror is invaluable. Without unflinching self-reflection, the spiritual journey can stall and become stuck in a rut (even if it's a pleasant rut).
Finally, we can also dissolve saṃskāras in our daily life, whenever they are triggered. (This is really good news.) When a saṃskāra is triggered, it's a golden opportunity: if you can fully be present with the emotion that is arising (fear, pain, or craving, for example), allowing it to pass through without judging it or yourself for having it, then a portion of the samskāra that it is arising from is dissolved. It's important to suspend judgment because all value judgments are a form of resistance to reality, and it is resistance that creates and strengthens saṃskāras. Note that even attachment is a form of resistance, because attachment is (among other things) the feeling "I don't want this to go away" and thus is resistance to the reality of impermanence. Western psychology focuses a lot on pain and its healing — but in yoga psychology, the samskāras arising from our experiences of pleasure need 'healing' just as much; because the attachments we form on their basis are just as obscuring of our ability to experience reality as it is, just as hindering of our capacity to access true joy (ānanda), as the pain-based samskāras of aversion are.
There's no way out but through. Saṃskāras don't go away by themselves, and until they are dissolved, you are not truly free. Though many lighter saṃskāras are shed at the time of death, the deeper ones carry over into the next life, and the next, until they are healed. This explains why sometimes people experience intense traumatic emotions that seem disproportionate to anything that happened in this life. For example, if you were burned as a 'witch' in a past life, even mild persecution or marginalization in this life will spark an intense emotional response. There are of countless countless less dramatic examples. Past-life saṃskāras are said to explain phobias that don't stem from any this-life experience. But even intense fears can be dissolved, little by little, by cultivating our ability to simply allow them to pass through.
This practice of nonjudgmental allowing not only dissolves saṃskāras, but just as importantly, prevents new ones from being laid down. When we let new experiences and emotions pass through us without clinging to them or resisting them, no saṃskāra is deposited, and we are thereby liberating our future selves as well.
Postscript: having said all that, I'm not particularly in favor of fascination with past lives or past-life regression therapy. Why? Because the Yoga-sūtra, the Bhagavad-gītā, and Tantrik philosophy (my primary sources for this post) all tell us that a yoga practice (which includes bhāvanā-type meditation) will, in and of itself, eventually resolve all samskāras, at a rate determined solely by the clarity of one's intention, the rigor of one's self-inquiry, and the intensity of one's practice. Modalities that depend on experts — like psychotherapy — can be helpful, but are not strictly necessary, because, fortunately, we do not need to remember every painful experience in order to heal it.