The view that the mind and all its workings is a function of the brain, is probably the most commonly held understanding of the mind in the world today.  But the yogic view is radically different. There was an appreciation that we exist as eternal spiritual beings, temporarily occupying a gross material body, and also covered by a subtle material body constituted primarily of the mind.   Three Vedic verses I quote speak to this:

“The individual is the passenger in the chariot of the material body, and intelligence is the driver. Mind is the driving instrument, and the senses are the horses. The self is thus the enjoyer or sufferer in the association of the mind and senses. So it is understood by great thinkers.”   – Katha Upanisad 1.3.3-4

The working senses are superior to dull matter; mind is higher than the senses; intelligence is still higher than the mind; and he [the soul] is even higher than the intelligence. – Bhagavad-gita 3.42

Transcendentalists who are advanced in knowledge compare the body, which is made by the order of the Supreme Personality of Godhead, to a chariot. The senses are like the horses; the mind, the master of the senses, is like the reins; the objects of the senses are the destinations; intelligence is the chariot driver; and consciousness, which spreads throughout the body, is the cause of bondage in this material world. – Bhagavat Purana 7.15.41

The goal of human life promoted in the Vedas was to achieve spiritual liberation from material entanglement through self-realization.  This involved exercising control of the mind as opposed to being enslaved and victimized by it.

One must deliver himself with the help of his mind, and not degrade himself. The mind is the friend of the conditioned soul, and his enemy as well.  – Bhagavad-gita 6.5

For one who has conquered the mind, the mind is the best of friends; but for one who has failed to do so, his mind will remain the greatest enemy. – Bhagavad-gita 6.6

 

A deeper understanding of the mind and how it affects us was integral to the practice of yoga. Such an understanding is found in the Yoga Sutra:

The mind is not self-illuminating being itself an object of perception (that which is knowable). YS 4.19

Not being self-luminous, the mind cannot be aware of an object and itself (as perceiver and perceived) at the same time.    YS 4.20

The pure and transcendental consciousness of the atma (self) is unchangeable.  When the mind receives the reflection of that consciousness it is able to perceive and appears like the seer.  YS 4.22

The mind, being able to perceive due to its reflecting both the atma (self) and objects of perception, appears to comprehend everything. YS 4.23

Even though the mind has accumulated various impressions (and desires) of various types it is always at the disposal of the atma (self). This is because the mind cannot function without the power of the perceiver.  YS 4.24

There was an appreciation of how an uncontrolled mind was seen as an enemy of the self:

This uncontrolled mind is the greatest enemy of the living entity. If one neglects it or gives it a chance, it will grow more and more powerful and will become victorious. Although it is not factual, it is very strong. It covers the constitutional position of the self/atma.  – Bhagavat Purana 5.11.17

In the Bhagavad-gita there is an observation by Arjuna as to the difficulty of controlling the mind, but also a reassurance by Sri Krishna that it is possible:

For the mind is restless, turbulent, obstinate and very strong, O Krishna, and to subdue it, I think, is more difficult than controlling the wind.  – Bhagavad-gita 6.34

Lord Krishna said: O mighty-armed son of Kuntī, it is undoubtedly very difficult to curb the restless mind, but it is possible by suitable practice and by detachment. – Bhagavad-gita 6.35

For one whose mind is unbridled, self-realization is difficult work. But he whose mind is controlled and who strives by appropriate means is assured of success. That is My opinion. – Bhagavad-gita 6.36