Yoga is said to be a path to god-realization, which is an odd sounding concept to the traditional Western views because if a person believes in a personal Divine being called God it would seem to be blasphemy to assert that one can become one with God. Indeed people have been put to death for making such claims in the past.
If a person doesn’t believe in a God as a being then yoga is often regarded as just another religion. So to properly understand this it is necessary to realize that yoga views the divine differently from either of the other views. Yoga regards God as the intelligence and consciousness that exists within everything; however below what is perceived with the 5 senses. So Yoga is not a religion or even a collection of beliefs as much as it is simply connecting with the nature of reality.
The inner yoga, which is the main focus of classical yoga, is primarily the yoga of meditation. It consists of 3 aspects. Concentration, reflection, and unity consciousness. The yoga postures which are what most people think of when they think of yoga were designed to enable a person to sit comfortably for long periods of time in meditation without physical strain.
So the goal of the postures is to make the body comfortable for meditation. Then to increase mental alertness during meditation breathing exercises were designed to bring pranic energy into the body. This is called pranayama. Without the energy of pranayama meditation can become a dull, sleepy or boring experience.
So you see yoga is never just one thing. Remember the word means union. It is a harmonizing all the aspects of our lives and reconnecting with our Higher Self. So there can be many approaches and techniques utilized to bring a person into union with god.