Yoga Sutras 3.45
Patanjali, explained by Swami Vivekananda
स्थूल-स्वरूप-सूक्ष्मान्वयार्थवत्त्वसंयमाद्भूतजयः ॥
sthūla-svarūpa-sūkṣmānvayārthavattvasaṃyamādbhūtajayaḥ
By making Samyama on the gross and fine forms of the elements, their essential traits, the inherence of the Gunas in them and on their contributing to the experience of the soul, comes mastery of the elements.
In plain words: By focusing deeply on the elements of nature, from their solid forms to their finest parts, their qualities, and how they serve the soul's experience, the yogi gains mastery over the elements.
Swami Vivekananda explains
The Yogi makes Samyama on the elements, first on the gross, and then on the finer states. This Samyama is taken up more by a sect of the Buddhists. They take a lump of clay and make Samyama on that, and gradually they begin to see the fine materials of which it is composed, and when they have known all the fine materials in it, they get power over that element. So with all the elements. The Yogi can conquer them all.