This yoga sutra enumerates the hindrances to freedom from suffering, two of which are essentially the opposite sides of the same coin. Raga is desire or craving or attachment, and dvesa is aversion or hatred or inability to withstand unpleasant circumstances. The desire or aversion can be small scale, like scratching an itch or wanting to change the position of your legs in meditation because of your intolerance to the discomfort, or long-term and large scale, such as to build an empire, to conquer a territory, to dominate the world etc.
It is interesting that in prisons, solitary confinement is given as the ultimate punishment, whereas yogis who are interested in enlightenment voluntarily go into isolation, shutting off senses, so they can confront their desires and aversions, one by one, as they arise. To the mind that is not ready, having nothing else but our desires or aversions to confront is torturous. For the yogi, the same desires and aversions— the observation and transcendence of it— are paths to freedom.
Fortunately, we do not have to go into complete isolation to start the practice of observing both desires and aversions. We can start the practice simply by observing how often desire or aversion comes up, paying attention to their characteristics, and seeing them for what they are.
Life is going to constantly provide us with opportunities to deal with desires and aversions. If we are not conscious of them or if we have no interest in freedom, it may feel as though we are being thrown into uncontrollable waves, and we have nothing to do except be swept by them. But if we are invested and committed in our enlightenment, then we see that the same desires and aversions are here to train us to keep our minds serene, that we don’t have to follow the old patterns of our knee-jerk reactions, that we can instead be still, and find peace not despite the desires and aversions, but find peace through the desires and aversions. And that is how we become free from the prisons of our own minds.