Yogis are Realized Souls.
Yoga, according to Patanjali, is the ‘Cessation of Modification of Chitta’
Yoga has, Chittavrutthi Nirodhithaha-Patanjali Yoga Sutra.
The control and regulations of the mind and through it, The Consciousness is the goal of Yoga.
There is another earlier system of Yoga.
This is called Vaasi Yoga where, by breath control, Consciousness is directly controlled.
This was the first system by Lord Shiva and His disciple Patanjali developed a relatively easy system Asthtanga Yoga.
Shiva was the first to practice Vaasi Yoga and He is called the Adi Yogi, the First Yogi.
If one repeats Vaasi it becomes Siva.
The system of Patanjali was practised widely.
And we have Siddhas who transcend time and apart from Shiva, the early one was Thirumoolar, a Tamil Siddha, who had written a Sastra Thirumandhiram in Tamil. Thirumoolar is dated around 3000BC.
What do the Vedas say of Yoga?
To my knowledge, there is no reference to Yoga in the Vedas, except a description of a Yogi in the Rig Veda, which is dated around 5000 years ago.
Here is the Kesin Mantra of the Rig Veda which describes a Yogi.
HYMN CXXXVI. Kesins.
1. HE with the long loose locks supports Agni, and moisture, heaven, and earth:
He is all sky to look upon: he with long hair is called this light.
2 The Munis, girdled with the wind, wear garments soiled of yellow hue.
They, following the wind’s swift course go where the Gods have gone before.
3 Transported with our Munihood we have pressed on into the winds:
You therefore, mortal men. behold our natural bodies and no more.
4 The Muni, made associate in the holy work of every God,
Looking upon all varied forms flies through the region of the air.
5 The Steed of Vāta, Vāyu’s friend, the Muni, by the Gods impelled,
In both the oceans hath his home, in eastern and in western sea.
6 Treading the path of sylvan beasts, Gandharvas, and Apsarases,
He with long locks, who knows the wish, is a sweet most delightful friend
7 Vāyu hath churned for him: for him he poundeth things most hard to bend,
When he with long loose locks hath drunk, with Rudra, water from the cup.
Translation by Rig Veda, tr. by Ralph T.H. Griffith, , at sacred-texts.com
केश्यग्निं केशी विषं केशी बिभर्ति रोदसी । केशी विश्वं स्वर्दृशे केशीदं ज्योतिरुच्यते ॥१॥
मुनयो वातरशनाः पिशङ्गा वसते मला । वातस्यानु ध्राजिं यन्ति यद्देवासो अविक्षत ॥२॥
उन्मदिता मौनेयेन वाताँ आ तस्थिमा वयम् । शरीरेदस्माकं यूयं मर्तासो अभि पश्यथ ॥३॥
अन्तरिक्षेण पतति विश्वा रूपावचाकशत् । मुनिर्देवस्यदेवस्य सौकृत्याय सखा हितः ॥४॥
वातस्याश्वो वायोः सखाथो देवेषितो मुनिः । उभौ समुद्रावा क्षेति यश्च पूर्व उतापरः ॥५॥
अप्सरसां गन्धर्वाणां मृगाणां चरणे चरन् । केशी केतस्य विद्वान्सखा स्वादुर्मदिन्तमः ॥६॥
वायुरस्मा उपामन्थत्पिनष्टि स्मा कुनन्नमा । केशी विषस्य पात्रेण यद्रुद्रेणापिबत्सह ॥७॥
– Rigveda 10.136, 2nd millennium BCE
The Keśin were long-haired ascetic wanderers with mystical powers described in the Keśin Hymn (RV 10, 136) of the Rigveda (an ancient Indian sacred collection of Vedic Sanskrithymns).The Keśin (“long-haired one”) are described as homeless, traveling with the wind, clad only in dust or yellow tatters, and being equally at home in the physical and the spiritual worlds. They are on friendly terms with the natural elements, the gods, enlightened beings, wild beasts, and all people. The Keśin Hymn also relates that the Keśin drink from the same magic cup as Rudra, which is poisonous to mortals.
The Kesin hymn of the Rigveda is the earliest evidence of yogis and their spiritual tradition, states Karel Warner. The Hindu scripture Rigveda uses words of admiration for Kesins.