Then follows the fifth stage of astanga yoga, pratyāhāra (sūtra 2.54):
svaviṣaya asaṃprayoge cittasya svarūpa-anukāra iva indriyāṇām pratyāhāraḥ
Pratyāhāra means that the senses no longer come in contact with their own (external) objects and are withdrawn into the mind-stuff. In the next sūtra Patañjali describes the effect: the yogi thereby obtains complete control of the senses (sūtra 2.55).
For the retraction of the senses it takes a lot of patience, by force the practitioner reaches nothing. On the contrary, what happens if we do not want to think of something in particular? We only have our head full of it. It is better to accept all the thoughts and feelings that appear in us and to think that they come from God and are nothing other than a manifestation of Atma (the Divine Soul).