The mind is unstuck from its habitual patterns (tannirodhah) through practice (abhyāsa) and nonattachment (vairāgyābhyām).
Also through the practise of nonattachment. It is the practise of yoga that Patanjali is advocating, the details of this will be expounded at the sutras continue. The more I study, explore and live with the yoga sutras the more I appreciate that they don’t exist in isolation of each other, whilst we can break them down and examine them each specifically, this is unlikely to be the most efficient way of grasping them . Patanjali lays firm foundations, I would describe this as a guide book rather than an instruction manual. Even when Patanjali does begin to go into greater detail about what we can practice the instructions are minimal and terse, it is the act of practising which becomes the teacher.
It is worthy of note that nonattachment rather than detachment is the translation I favour. It is a subtle but important difference. Nonattachment acknowledges that we love, we feel, we experience emotions and we may well need to acquire some material possessions to function effectively within society, but we are not attached to them, they come, they go we remain equanimous. From detachment I infer a coldness, an aloofness, a not engaging with life. Yoga is not about disengaging from life but rather living as fully as we can in a state of freedom. We are undisturbed by the horrors but this does not mean that we don’t see them and that we can’t agitate for change but we are more effective advocates as we see beyond the whirling mind stuff.
Please note this is bloody difficult, which may well be why it’s a practise! If at first you don’t succeed, try and try again, across as many life times as we need.