Sankhya Yoga is the Yoga of contemplation. It is also known as Jnana Yoga. There are basically 2 methods (1) 'Neti Neti' contemplation and (2) 'Who am I?' or self inquiry contemplation.
Jnana Yoga
Neti neti (not this, not this) is the via negativa path of Jnana Marga. This method is explained below.
No one can say with finality that God is only 'this' and nothing else.
He is formless and again He has forms. For the bhakta He assumes
forms. But He is formless for the jnani, that is, for him who looks on
the world as a mere dream. The bhakta feels that he is one entity and
the world as another. Therefore God reveals Himself to him as a
Person. But the jnani – the Vedantist, for instance - always reasons,
applying the process of 'Not this, not this'. Through this
discrimination he realizes, by his inner perception, that the ego and
the universe are both illusory, like a dream. Then the jnani realizes
Brahman in his own consciousness. He can not describe what Brahman is.
The Gospel of Sri Ramakrishna, Chapter 6, The Master with the Brahmo Devotees (I)
The self inquiry contemplation of Jnana Yoga is explained below.
Do you know what I mean? Think of Brahman, Existence-Knowledge-Bliss
Absolute, as a shoreless ocean. Through the cooling influence as it
were, of the bhakta's love, the water has frozen at places into blocks
of ice. In other words, God now and then assumes various forms for His
lovers and reveals Himself to them as a Person. But with the rising of
the sun of knowledge, the blocks of ice melt. Then one doesn't feel
any more that God is a Person, nor does one see God's forms. What He
is can not be described. Who will describe Him? He who would do so
disappears. He cannot find his 'I' anymore.
If one analyzes oneself, one doesn't find any such thing as 'I'. Take
an onion, for instance. First of all peel off the red outer skin; then
you find thick white skins. Peel these off one after the other, and
you won't find anything inside.
In that state a man no longer finds the existence of his ego. And who
is there left to seek it? Who can describe how he feels in that state -
in his own Pure Consciousness - about the real nature of Brahman?
There is a sign of Perfect Knowledge. Man becomes silent when It is
attained. Then the 'I', which may be likened to the salt doll, melts
in the ocean of Existence-Knowledge-Bliss Absolute and becomes one
with It. Not the slightest distinction is left.
The Gospel of Sri Ramakrishna, Chapter 6, The Master with the Brahmo Devotees (I)
Karma Yoga
Desire is the rope that binds us to the endless cycle of samsara. So if we can conquer desire than we can escape samsara. Gita says that it is possible to reduce desire by practicing nishkama karma or detached karma.
You may be worrying about the practicality of nishkama Karma which is part of Karma Yoga. A person practices Karma Yoga when his work benefits other people and the work is done without caring about the result or name, fame, promotion, wealth etc. This type of work is called nishkama karma. Nishkama Karma is not about the ordinary karma like professional work done by us. The idea behind nishkama karma is that God dwelling in the other person is giving us a chance to serve God and thus help ourselves. Whether the other person is helped will depend on God. By practicing unselfish service of others one loosens the hold of desire and attains moksha.
Does detachment from results mean we should not plan at all to get good results when performing karma ? Should we not focus on efficiency of work because we do not care about results ?
You should of course plan to the best of your ability. You also should focus on efficiency of work. You should, however, always remember that it is hubris to think that one human can help another human.
Only Ishvara can help
Therefore, O dear one! Give up your infatuation born of ignorance,
which makes you feel worried, thinking – how will these helpless
people get without me? To think that one can save or protect another
while one’s own body, subject to the power of time, karma and Guna, is
decaying, is like a person in the grip of a python thinking of saving
another.
Srimad Bhagavata Purana I.13.44-45
An example of nishkama karma is the Sun. I am posting a poem by Hafiz, the 13th century Persian poet, that captures the essence of Karma Yoga.
Even
After
All this time
The sun never says to the earth,
"You owe
Me"
Look
what happens With a love like that,
It lights the
Whole Sky.
The Gift, Poems of Hafiz, The Great Sufi Master, translated by Daniel Ladinsky.
The sun does not care what man does with the energy of the sun that makes life possible on earth. The sun just keeps on pouring energy. It doesn't matter what field you are in. If you can help even one person without caring about the result of your help then you are doing Karma Yoga.
It is not possible to do karma Yoga in a job setting. You will most likely get fired if you are unattached to the result of your work. Karma Yoga is after all a Yoga and unattached work can only be done as part of divine work.
A householder will find it difficult to do nishkama karma. He will hanker after the fruits of his work. He will certainly lose motivation if he doesn't have the expectation of good things of life and if his effort fails. It takes a great deal of effort to work with passion and yet remain detached from all expectations. Most persons only do karma. Only spiritual seekers try to do karma Yoga.
Both Jnana Yoga and Karma Yoga are methods to reduce our egotistic desire to stay in Samsara. One does it by removing our ignorance about true nature (Jnana Yoga) and other by the practice of unselfish service.