In the yogic context, meditation on Dhyana is defined more specifically as a state of pure consciousness. It is the seventh stage of the yogic path and follows dhyana or meditation in turn precedes samadhi, the state of final liberation on enlightenment.
Recall that the first four stages as yama(ethics), and pranayama ( life force extention) are considered external disciplines. The fifth stage, pratyahana represents the withdrawal of the senses. This sensual withdrawal arises out of the practice of the first four stages and links the external to the internal. When we are grounded physically and mentally, we are keenly aware of tour senses. yet disengaged at the same time. without this ability to remain detached yet observant, it is not possible to meditate.
For that, Before meditation you must need to connect with six steps as yama, Niyama, Asana, Pranayama, Pratyhana and Dharana.