The spiritual sense of the word yoga first arises in Epic Sanskrit, in the second half of the 1st millennium BCE, and is associated with the philosophical system presented in the Yoga Sutras of Patanjali, with the chief aim of "uniting" the human spirit with the Divine. The term kriyāyoga has a technical meaning in the Yoga Sutras (2.1), designating the "practical" aspects of the philosophy, i.e. the "union with the supreme" due to performance of duties in everyday life.
"...[T]here is the cultivation of meditative and contemplative techniques aimed at producing what might, for the lack of a suitable technical term in English, be referred to as 'altered states of consciousness'. In the technical vocabulary of Indian religious texts such states come to be termed 'meditations' ([Skt.:] dhyāna / [Pali:] jhāna) or 'concentrations' (samādhi); the attainment of such states of consciousness was generally regarded as bringing the practitioner to deeper knowledge and experience of the nature of the world." (Gethin, 1998, p. 10.)
Description of an early form of yoga called nirodhayoga (yoga of cessation) is contained in the Mokshadharma section of the 12th chapter (Shanti Parva) of the Mahabharata (third century BCE). Nirodhayoga emphasizes progressive withdrawal from the contents of empirical consciousness such as thoughts, sensations etc. until purusha (Self) is realized. Terms like vichara (subtle reflection), viveka (discrimination) and others which are similar to Patanjali's terminology are mentioned, but not described. There is no uniform goal of yoga mentioned in the Mahabharata. Separation of self from matter, perceiving Brahman everywhere, entering into Brahman etc. are all described as goals of yoga. Samkhya and yoga are conflated together and some verses describe them as being identical. Mokshadharma also describes an early practice of elemental meditation. Mahabharata defines the purpose of yoga as the experience of uniting the individual ātman with the universal Brahman that pervades all things. https://www.facebook.com/Buzzing-Offer-Digital-Marketing-1107247206148320/