There is a Japanese concept "Muyshin No-Shin" which roughly translated means, "The mind does not acknowledge the mind".
The mind is a projection of the brain, the brain is an organ which serves as a receptacle for the 5 senses. Consequently, the mind can operate from data received from these 5 senses. It is commonly known that the senses can be fooled. For example, a magician is always fooling your senses. If the senses can be fooled then the data received by the brain cannot be relied upon. The brain thus transmutes to the mind in which we place such great importance.
The mind is the origin of thought. Thoughts are electrical impulses that are stimulated by the 5 senses. Since there is a constant stimulation of the senses, there is a constant flow of thought. Both random and deliberate thought are the result of this stimulation.
To apply the concept of "Muyshin No-Shin" one must ignore random thought and focus on deliberate thought. The question one may ask now is, "How does one differentiate between deliberate and random thought?" When there is a thought in response to a direct stimulation in the present tense, that is deliberate thought. When a thought passes through the mind seemingly from nowhere, it is random thought.
An example of random thought is as follows. You are driving to your office and you barely notice a lady putting her child on the school bus. Your mind drifts to your younger days when you used to put your children on the bus. You now reminisce of how they have grown up and moved away and barely keep in touch. This makes you feel sad. Your mind takes note of the negative feeling and you don't realize why suddenly you feel depressed. An example of deliberate thought is as follows. You feel a hollow sensation in your stomach and you realize that you have missed your meal. You respond by going in search of food.
Do not allow the mind to lose focus, instead keep your thoughts in direct response to the present. Only then will you be free of mental chatter!