The origins of yoga have been speculated to date back to pre-Vedic Indian traditions; it is mentioned in the Rigveda, but most likely developed around the sixth and fifth centuries BCE, in ancient India's ascetic and śramaṇa movements. The chronology of earliest texts describing yoga-practices is unclear, varyingly credited to Hindu Upanishads. The Yoga Sutras of Patanjali date from the first half of the 1st millennium CE, but only gained prominence in the West in the 20th century. Hatha yoga texts emerged around the 11th century with origins in tantra.
Yoga gurus from India later introduced yoga to the west, following the success of Swami Vivekananda in the late 19th and early 20th century
The ultimate goal of Yoga is moksha (liberation), although the exact definition of what form this takes depends on the philosophical or theological system with which it is conjugated.
- Yoga, is a meditative means of discovering dysfunctional perception and cognition, as well as overcoming it for release from suffering, inner peace and salvation; illustration of this principle is found in Hindu texts such as the Bhagavad Gita and Yogasutras, in a number of Buddhist Mahāyāna works, as well as Jain texts;
- Yoga, as the raising and expansion of consciousness from oneself to being coextensive with everyone and everything; these are discussed in sources such as in Hinduism Vedic literature and its Epic Mahābhārata, Jainism Praśamaratiprakarana, and Buddhist Nikaya texts
- Yoga, as a path to omniscience and enlightened consciousness enabling one to comprehend the impermanent (illusive, delusive) and permanent (true, transcendent) reality; examples are found in Hinduism Nyaya and Vaisesika school texts as well as Buddhism Mādhyamaka texts, but in different ways
- Yoga, as a technique for entering into other bodies, generating multiple bodies, and the attainment of other supernatural accomplishments; these are, states White, described in Tantric literature of Hinduism and Buddhism, as well as the Buddhist Sāmaññaphalasutta