The purpose of meditation is to link us back with existential or living reality through present moment awareness rather than living in our own psychological worlds through incessant and compulsive thinking and emoting, and living in past or future through memory or imagination.
The mind is an excellent instrument which helps us in planning, understanding cause and effect, calculating and so on. As long as it is a servant to us it is useful.
Trouble begins when we identify with the mind and its thoughts and emotions and try to find our identity in them. This is what is meant by the ego in eastern philosophy, and some live most of their lives in compulsive thinking and emoting. This is where the mind ceases to be a servant and starts becoming our master instead and traps us in an unreal psychological world of thoughts, images and emotions we have created unwittingly.
Intense desires in the form of cravings and aversions heavily generate compulsive thinking and emoting incessantly. All vices such as greed, lust, hatred, arrogance, inordinate attachments leading to crimes such as robbery, rape, murder, substance abuse are but manifestations of cravings or aversions.
Ramana Maharshi associated the untamed mind with Maya or illusion.
Krishna and Buddha emphasized the importance of a trained mind which is subservient to our will and does not get carried away with compulsive thinking and emoting.
Whatever harm an enemy may do to an enemy, or a hater to a hater, an ill-directed mind inflicts on oneself a greater harm. Neither mother, father, nor any other relative can do one greater good than one’s own well-directed mind. ~ Buddha ( Dhammapada 42-43)
For him 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.~ Krishna ( BG: 6.6)
Meditation is but living in the present moment awareness, and most authentic meditation technique focuses on breaking the grip of the psychological mind on us, so that we become in tune with existential living reality rather than our self-created psychological reality. Neurosis and psychosis are extreme cases where the grip of psychological reality overwhelms the living existential reality heavily.
These articles can help you understand this subject better....
The Mechanics of Human Suffering
Being Conscious
Vernon Howard on conscious sweeping as a spiritual exercise...