The ultimate aim of Yoga is Moksha or Liberation. But you are not bound to follow all steps leading upto Moksha. Practice what you can.
If you practice Yama, Niyama and Asanas, you will definitely get physically fit.
If you want to go a step further and practice Pranayama and Pratyahara, it will help to free the senses from the clutches of the objects of desire, which are the biggest cause of unhappiness.
Having come this far, questions such as the purpose of one’s existence and search for truth might come to your mind. That is where the last 3 stages would help deliver you to Nirvana or Moksha