The mind is an outgrowth of the infinite, an appendage of the Self. Its function is to know thy Self, which as pure awareness is without self-knowledge. For Beingness simply IS. How to know itself but by creating a mirror in which it is reflected?
Man is made in the image of God. The mind, unique to man, is this mirror, in which is reflected the divine consciousness. But the universe, the manifest world, is also an aspect of the Self. Too often, the mind's attention is turned and even confined to external events. To people, and places, and even thoughts which people and places give rise to, and the feelings the thoughts engender. And soon the mind spends its time dwelling on past events or anticipating the future. And this is fine. For a time. The mind is an organ of experience. And experience is part of the human condition.
But never lose sight of its true purpose, which is to turn inward and commune with, harmonize with, reflect and examine the Self in its pure, infinite, changeless perfection. And thereby the mind is perfected. Meditation achieves merging of the self (mind) with the Self (infinite spirit). By requiring that we set aside a few moments of quiet and stillness we achieve the habit of turning the attention inward and reflecting the stillness within by becoming still.
This is Self realization. This is life's ultimate goal.
Follow the Master (turn inwards and attend to the immanent Self)
Face the devil (of lusts and sensuality which forever bedevil the mind and occupy the attention)
Fight to the end (still the mind)
Finish the game. (be realized)
This is all you need to do.