Yoga sutra 3.4 states: trayam ekatra samyama: The three [dharana, dhyana, and samadhi] as one is called samyama. The last three limbs of the eight limbs of yoga are considered those limbs that happen naturally, whereas the first five limbs are actively practiced.
Dharana, or concentration, is the process of fixing the mind on one object. It is about training the mind to stay focused. It takes time, patience, and practice. We could think of it very much like training a puppy to sit still. Dhyana, or meditation, is the sustaining of dharana for a long period of time. As one becomes more proficient at dharana, one moves seamlessly into dhyana.
The last and final limb of the eight limbs, samadhi, is the process of that sustained concentration completely absorbing the concentrator such that the concentrator and the object become one. Together, these three rungs are known as samyama.
Once samyama is achieved, one has full awareness that they are not their body, mind, or anything else physically conceivable. They are also aware that anything they encounter in the physical world is not as it seems. Samyama is a state of enlightenment, and is usually attained after long periods of time spend in meditation.