Samkhya means enumeration, and the name is literal. The system is a list of twenty-five principles, tattvas, set out in the order in which they emerge from one another.
At the head stand the two that emerge from nothing. Purusha is consciousness, plural rather than single, inactive, a witness and not an agent. Prakriti is the unconscious ground of everything else, held in equilibrium until the proximity of purusha disturbs it.
From prakriti unfolds buddhi, the faculty of discernment, and from buddhi ahamkara, the I-maker, which is where the sense of being a separate self is manufactured. From ahamkara come manas, the coordinating mind, the five faculties of perception, the five faculties of action, and the five subtle elements, and from the subtle elements the five gross elements. That is twenty-three evolutes, and with prakriti and purusha the count is complete.
Running through all of it are the three gunas, sattva, rajas and tamas, which are not qualities that things happen to have but the constituents that things are made of, present in every product in shifting proportion. This part of the system was borrowed everywhere. The vocabulary of the gunas turns up in the Mahabharata, in Ayurveda, in the Bhagavad Gita and across later Hindu thought, usually detached from the metaphysics that produced it.
Liberation, kaivalya, is discrimination between purusha and prakriti held steadily enough that consciousness stops mistaking the performance for itself. Nothing is destroyed and nothing is joined. The witness simply stops identifying with what it was watching.