Let's begin with the pranayama which is done because it is in between physical body and subtle part of our being. In the journey from the physical world to subtle world, it would be difficult to shift your consciousness from physical body to subtleness. Pranayama acts as taking the help of this bridge to shift the consciousness from outer to inner world, because breath is both physical as well as subtle and therefore breath control is related to the mind control. It happens when you are established in stability and comfort which is called as Asana as sthiram sukham asanam. How you can establish even physically as stable and comfortable without controlling the mind or with the wavering mind or without getting rid of distractions. Mind comes into the discipline only when it is given positive tasks or engagements and this giving is Yama and niyama. Pratyahara is done to move inside and opposite to direction of senses/ sense organs which have nature to wander outside and dissipate energy. Dharana, dharana and Samadhi is the journey which starts from inside as Drashta (Seer) which is separate from the body/ mind and establishes itself in Paramdham during samadhi. Samadhi is when the drashta is absorbed in this place - Brahma Tattwa.