Patanjali defines one of the main goals of yoga as the ability to control the changing thought waves of the mind. In the Yoga Sutras, Patanjali explains how our mind is constantly recording the situations, events and objects of our external world, forming thoughts around them. Our ego then identifies itself with these thoughts. So, if a thought is a happy one, our ego is happy. If it’s one we are averse to, our ego isn’t so happy. (Learn How to See the Ego for What it Is.)
Through the practice of yoga, Patanjali teaches us to learn how to control our changing states of mind because they are the cause of our suffering. Although our changing thoughts are powerful, our true Self lies beyond our thoughts. It isn't altered by our changing mental states. If we want to discover and connect with our true Self, we must learn to distinguish it from these impermanent mental states. We must become masters of these cessations of the mind in order to break free from suffering, which the Bhagavad Gita describes as the essence of yoga.
Mastering our thoughts doesn’t mean we make our minds totally blank. It’s about unlearning the way our ego falsely identifies with these thoughts. Identifying with our thoughts is part of the human condition. We all do it, but if we want true freedom from suffering, then we need to follow Patanjali’s advice. (Learn more about the Roots of Suffering.)
If we allow negative thoughts free reign, they can build and build in our psyches until we perceive life from a muddied perspective. Then they solidify, becoming ingrained patterns of thinking that make up part of our character. The reverse is also true. By cultivating loving and positive thoughts instead, they will also solidify into our character. This is how we can grow into being compassionate human beings. Meditation is the starting point. It's the place where we can become aware of what our thoughts are and which ones are habitual. (Read on in Meditation: How to Find the Starting Point.)