Yoga Sutras of Patanjali defines yoga as restraint of the mental states (Chapter 1.2). According to it in the state of total restrain the mind is devoid of any external object and is in its true self or the consciousness. To control the mind many Vedic scholars have given their own formulas.
Being in touch with ones own consciousness require restrain of mind, intellect and ego on one hand and the triad of rajas, tamas and satwa on the other hand. Every action leads to a memory, which in turn leads to a desire and with this a vicious cycle starts.
The mental turmoil of thoughts can be equated to the internal noise and the external desires and objects to an external noise.
The process of withdrawing from the external noise with an aim to start a journey inwards the silent field of awareness bypassing the internal noise is called pratihaara by Yoga Sutras of Patanjali. It involves living in a satwik atmosphere based on the do’s and don’ts learnt over a period of time or told by the scriptures.
To control inner noise based thoughts either we need to neutralize negative thoughts by cultivating opposite thoughts or kill the origin of negative thoughts.
Not allowing thoughts to occur has been one of the strategies mentioned by the scholars. One of them has been neti-neti by Yagnayakya.
The other way is to pass through these inner thoughts and not get disturbed by it and that is what the process of meditation is. This can be equated to a situation where two people are talking in an atmosphere of loud external noise. For proper communication one will have to concentrate on each others voice for long till the external noise ceases to disturb. In meditation one concentrates on the object of concentration to such an extent that the noisy thoughts cease to bother or exist.
One of the ways mentioned by Aadi Shankaracharya in Bhaja Govindam and by Yoga Sutras of Patanjali (Chapter 2.35) is that whenever one is surrounded by evil or negative thoughts one should meditate open the contrary thoughts. For example, if one is getting evil desires after seeing bare breasts of a young lady, one can think that these very breasts gave me an opportunity to drink milk when I was born. Similarly when one is feeling greedy one can have a desire of donating something to somebody. Deepak Chopra in his book Seven Laws of Spiritual Success talks in detail about the importance of giving and sharing. He says one should never visit his friends or relations empty handed. One should always carry some gift of nature which if nothing is available can be a simple smile, compliment or a flower. By repeatedly indulging into positive behavior and thoughts one reduces the internal noise which helps in making the process of meditation or conscious living a simpler one.
Washing out negative thoughts is another way mentioned by many vedic scholars. Three minutes writing is one such exercise which anybody can do. Just before sleep anybody can do free three minutes writing where one writes all his or her emotions and throw the paper away. Another exercise is to reward or punish one self at bed time for the activities done during the day by either patting or slapping yourself.