The Two Principles
Kapila proposed that reality consists of exactly two things:
Purusha: pure consciousness. It has no qualities, no activity, no change. It is the witness.
Prakriti: matter/nature. It is active, changing, qualified. It has three gunas - sattva (clarity), rajas (activity), tamas (inertia). Everything physical and mental is Prakriti.
The Dance
The universe begins when Purusha and Prakriti come into proximity.
Prakriti begins to dance - to evolve, differentiate, produce the world. The twenty-five principles of Sankhya emerge from Prakriti: intellect, ego, the five subtle elements, the five gross elements, the ten sense-and-action organs, and the mind.
Purusha watches.
The Problem
The problem is that Purusha forgets it is only a witness.
It identifies with Prakriti - thinks "I am the body," "I am the mind," "I am the emotions." This identification is the cause of bondage and suffering.
The Liberation
Liberation - in the Sankhya system - is the moment when Purusha realizes: I have never been Prakriti. I have only been watching. I am not the dancer. I am the audience.
This realization is viveka-khyati - discriminative wisdom. It ends the dance, or rather, it ends Purusha's identification with the dance.
The dance may continue. But the witness knows it is a witness.
The Legacy
The Sankhya framework - Purusha and Prakriti, the gunas, the twenty-five principles - was adopted directly by Patanjali's Yoga school. Classical yoga is Sankhya philosophy with the addition of Ishvara (God) as a special Purusha.
Kapila's framework is thus the foundation of both Sankhya and classical yoga.