The Yoga Sutras of Patanjali is the most famous text from the Yogic tradition of India. It is here where, according to the author in verse 1, "the teachings of Yoga are presented" most clearly.
The history of Yoga is somewhat cloudy. The word itself is used in a variety of ways, in, for instance, the Bhagavad Gita, and the "Yogic" school of India overlaps significantly with other classic Vedic texts such as the Upanishads and the Bhagavad Gita. The Yoga Sutras and these other classic Hindu texts share similar understandings of the Atman (the ground of the individual soul), and Brahman (the Divine Source of existence), although they sometimes use different terminology to describe these realities. The earliest trace of Yogic practice are seals from the 3rd Millennium BCE in which figures are seated in a clear Yogic posture.
Very little is known about the author, Patanjali, but his systematization of earlier Yogic traditions eventually became authoritative and normative for all future practitioners. The text itself is generally dated sometime between the 1st and 4th Centuries CE. Patanjali's school of Yoga also eventually became classified as one of the six schools of classic Indian philosophy (Sankhya, Yoga, Nyaya, Vaisesika, Mimamsa, and Vedanta). What Patanjali presents is not new, or his creation, but simply a systematizing of more ancient traditions.
There are a wide variety of classic and modern translations and commentaries of The Sutras. My favorite is from Edwin Bryant, who teaches at Rutgers University. In this series, I will provide excerpts from the Yoga Sutras themselves and Bryant's commentary on them.
In his Introduction, Bryant describes the Goals of Yoga, according to Patanjali, as follows:
"According to Patanjali's definition in the second sutra, yoga is the cessation of the activities or permutations (vrttis) of the citta. The vrttis refer to any sequence of thought, ideas, mental imaging, or cognitive act performed by the mind, intellect, or ego as defined above – in short, any state of mind whatsoever. It cannot be overstressed that the mind is merely a physical substance that selects, organizes, analyzes, and molds itself into the physical forms of sense data presented to it; in an of itself it is not aware of them. Sense impressions or thoughts are imprints in that mental substance, just as a clay pot is a product made from the substance of clay, or waves are permutations of the sea. The essential point for understanding yoga is that all forms or activities of the mind are products of prakrti, matter, and completely distinct from the soul or true self, purusa, pure awareness or consciousness.
The citta can profitably be compared to the software, and the body to the hardware. Neither is conscious; they are rather forms of gross matter, even as the former can do very intelligent activities. Both software and hardware are useless without the presence of a conscious observer. Only purusa is truly alive, that is, aware or conscious. When uncoupled from the mind, the soul, purusa, in its pure state, that is, in its own constitutional, autonomous condition – untainted by being misidentified with the physical coverings of the body and mind – is free of content and changeless; it does not constantly ramble and flit from one thing to another the way the mind does. To realize pure awareness as an entity distinct and autonomous from the mind (and, of course, the body), thought must be stilled and consciousness extracted from its embroilment with the mind and its incessant thinking nature. Only then can the soul be realized as an entity completely distinct from the mind (a distinction such cliches as "self-realization" attempt to express), and the process to achieve this realization is yoga...
Through grace or the sheer power of concentration, the mind can attain an inactive state where all thoughts remain only in potential but not active form. In other words, through meditation one can cultivate an inactive state of mind where one is not cognizant of anything. This does not mean to say that consciousness becomes extinguished, Patanjali hastens to inform us (as does the entire Upanishadic/Vedantic tradition); consciousness is eternal and absolute. Therefore, once there are no more thoughts or objects on its horizons or sphere of awareness, consciousness has no alternative but to become conscious of itself. In other words, consciousness can either be object-aware or subject aware (loosely speaking). The point is that it has no option in terms of being aware on some level, since awareness is eternal and inextinguishable. By stilling thought, meditation removes all objects of awareness. Awareness can therefore now be aware only of itself. It can now bypass or transcend all objects of thought, disassociate from even the pure sattvic citta, and become aware of its own source, the actual soul itself, purusa. This is self-realization (to use a neo-Vedantic term), the ultimate state of awareness, the state of consciousness in which nothing can be discerned except the pure self, asamprajnata-samadhi. This is the final goal of yoga and thus of human existence."
– Edwin Bryant, The Yoga Sutras of Patanjali
All this to say, with Patanjali in Verses 2 and 3 of his Sutras, that:
"Yoga is the stilling of the changing states of the mind.
When that is accomplished, the seer abides in its own true nature."
For more on the Yoga Sutras, check out this lecture from Edwin Bryant: