The Yoga Sutras of Patanjali consist of 196 sutras (literally "threads") — densely compressed aphorisms that require extensive commentary to unpack. They are traditionally divided into four chapters (padas): Samadhi Pada (on the nature and forms of meditative absorption), Sadhana Pada (on the practice), Vibhuti Pada (on the powers that arise from advanced practice), and Kaivalya Pada (on liberation).
The foundational definition appears in the second sutra: Yogas chitta vritti nirodhah — Yoga is the cessation of the modifications of the mind-stuff. The ordinary mind is in constant movement — thoughts, feelings, memories, fantasies arising and passing. Yoga is the progressive stilling of this movement until pure consciousness (Purusha) is no longer confused with the mind's activity and recognises its own nature as witness.
Patanjali's system is dualistic — Purusha (pure consciousness) and Prakriti (matter/nature, including the mind) are understood as two independent realities. Liberation (kaivalya) is the recognition that Purusha is not the mind, not the body, not any modification of Prakriti — but the unchanging witness of all modification. This distinguishes Patanjali's system from the non-dualism of Advaita Vedanta, though in practice the two traditions have influenced each other extensively.