"He who conquers the mind as if he has conquered the world"
To rectify all karma one has to rectify the karmas of the mind, and to rectify the karma of the mind, the mind has to be guarded. Because this mind is very fickle, it keeps on misleading man. It is not a simple thing to control it, yet it can be possible with the control of the senses and your sincere practice and dispassion.
One day Arjuna asked Lord Krishna to get the solution of his curiosity, O Krishna, this mind is very fickle, tell me the way to control it.
Shri Krishna said, Arjuna, of course the mind cannot stop, but it can be controlled by practice and dispassion. Only a person who practices continuously, who shuns greed, attachment and affection, can control the mind.
As the spiritual legend Anandamayai Ma used to say, in order to control the mind, we should try to know the soul instead of the body and the world. Keep the mind engaged in the contemplation of pure and noble thoughts. For this the control of the eyes, ears and tongue is necessary.
See no evil, hear no evil, speak no evil. If you watch corrupted scenes and listen to obscene talks, the mind will automatically get corrupted.
Aryan sannyasin Mahatma Anand Swami Saraswati used to say that the mind can remain pure only that which lives in a pure environment. Not only this, the person who eats sattvik food obtained from the money earned by honesty and hard work, he can be able to keep the mind under control.
You have to apply some rules in life. With exclusive mind, you have to take refuge in God. Chant the name of God. Meditating on the name of the Lord or the idol.
Pranayama and mental worship. To worship the Lord with love. Wherever the mind goes, remove it from there and put it at the feet of God, that is, to have the feeling of God everywhere.
"Meditation is also a way to stabilize (improve) the mind"
It is to sit quietly and let the mind go wherever it goes. Just watch it as a witness. Contemplate firmly on the feeling that I am a witness to the mind moving. I am not the mind, the mind is completely separate from me and I am connected to God. By practicing this, you will separate yourself from mind and emotion.
In the end a person will be able to understand himself completely different from the mind. After this the mind will become the servant of the seeker and that person will be able to rule over it at will. To be beyond the senses is the first stage of the yogi and when he has conquered the mind, then he attains the highest state.