The first step is to know how the mind works. The Chandogya Upanishad says that the mind works through the food it assimilates. Here food is used in the wider sense; that which is eaten is food for the tongue, that which is heard is food for the ears, and that which is seen is food for the eyes. When the perceptions that reach the mind through the various sense organs are disciplined and regulated, the mind can be transformed.
An aspirant must take care to perceive sights, sounds, and other sensations that are conducive to the purification of the mind. We really cannot help being influenced by the different sights and sounds that come to us through our senses. We are exposed to a variety of them, but only those to which we give priority register in our minds. For example, if you are conversing with a person in a room filled with many other people, you are aware of the noise in the background, but what is really being perceived by your ears is only the voice of the person you are talking to How is it SO ? Because the focus of your attention or concentration is only on that voice. Not everything that comes before the senses affects our minds, but only that which attracts our attention. Thus, you must be careful about what particular sensation you allow to catch your attention.
This is the reason for the emphasis on satsang-seeking the company of the wise, as well as the emphasis on studying the scriptures, cultivating and maintaining pure, elevated thoughts contemplating divine qualities, and finding joy in the beauty and serenity of nature. All these factors serve to keep the mind on an elevated plane.
A young shoot needs the protection of fencing and the attention of watering and fertilising. But once it becomes a full-fledged tree, it is all set to fend for itself. In the same way, until an aspirant is well established on the path, it is absolutely essential for that person to make all the necessary efforts to put the mind on the right path. When sadhana (spiritual practice) is done in the midst of a holy place, the mind of its own accord gets tuned to a high pitch because of the spiritual vibrations of the place. Likewise, when sadhona is done in a pleasing environment, the aspirant stands to be greatly benefited.