This yoga is made up of eight parts of which five are external and the other three are internal. Two of its parts, viz yama and niyama deal with types of behaviour that the student of yoga should avoid like lying, cheating, stealing etc. and those behaviours that he should cultivate like cleanliness, non-collection etc. Asanas and Pranayama are the next two parts of this yoga. Asanas are the physical movements that help in developing the suppleness of the body and thus cure any diseases. You can control your breath by using pranayama which increases the capacity of the lungs to take in air and thus increases the vitality of the body. The next part Pratyahara denotes the withdrawal of the sense organs from objects of enjoyment. The remaining three parts deal with intense mental concentration.
Patanjali maintained that practicing these eight parts of yoga faithfully and intensely will, over a period of time, erase all the impurities of the body and mind and thus attain knowledge that will liberate the person from bondage and ignorance. This yoga is called Ashtanga Yoga since it is made of eight parts. It is also called as Dhyana yoga due to its stress on mental concentration. Hence, whenever there is any mention of yoga, it is usually implied that the person is talking about Jnana Yoga