Samyama is defined in the Yoga Sutras of Patanjali verses 3.1 through 3.6 as follows:
देशबन्धश्चित्तस्य धारणा ॥ १॥
deśabandhaścittasya dhāraṇā .. 1..
Fixing the consciousness on one point or region is concentration (dhāraṇā).
तत्र प्रत्ययैकतानता ध्यानम् ॥ २॥
tatra pratyayaikatānatā dhyānam .. 2..
A steady, continuous flow of attention directed towards the same point or region is meditation (dhyāna).
तद् एवार्थमात्रनिर्भासं स्वरूपशून्यम् इव समाधिः ॥ ३॥
tad evārthamātranirbhāsaṃ svarūpaśūnyam iva samādhiḥ .. 3..
When the object of meditation engulfs the meditator, appearing as the subject, self-awareness is lost. This is samādhi.
त्रयम् एकत्र संयमः ॥ ४॥
trayam ekatra saṃyamaḥ .. 4..
These three together [dhāraṇā, dhyāna and samādhi] constitute integration or saṃyama.
तज्जयात् प्रज्ञालोकः ॥ ५॥
tajjayāt prajñālokaḥ .. 5..
From mastery of saṃyama comes the light of awareness and insight.
तस्य भूमिषु विनियोगः ॥ ६॥
tasya bhūmiṣu viniyogaḥ .. 6..
Saṃyama may be applied in various spheres to derive its usefulness.
Once Patanjali lays out the training in concentration–dharana, dhyana, and samadhi–he instructs the practitioner to use the resultant attention skills to explore all phenomena in the created world, including the mind itself. The yogi learns to use the “perfect discipline” (samyama) of concentrated mind to explore the entire field of mind and matter. Indeed, much of the third book of the Yoga Sutra, which is widely believed to be just about the attainment of supernormal powers, actually contains Patanjali’s instructions for a systematic exploration of the field of experience.
Excerpt from Yoga Journal Article Seeing Eye to Eye by Stephen Cope