This verse is from the Bhagavad Gita, Chapter 6, Verse 23. It is written in Sanskrit and translates to English as follows:
taṁ vidyād duḥkha-sanyoga-viyogaṁ yogasaṅjñitam
sa niśhchayena yoktavyo yogo ’nirviṇṇa-chetasā || 23 ||
“Sri Krishna tells Arjuna to know the state that causes separation from the union of sorrow and that is called “yoga”. This should be practiced with firm determination and a mind that is not disheartened.”
In this verse, Lord Sri Krishna has given the real definition of yoga. He explains that yoga is not limited to the actions of the body, but it is that mental and spiritual state in which a person attains detachment from the sorrows of his life. Here "Dukhsanyog" means the sorrows and sufferings in life, the only way to escape from which is the practice of yoga.
taṁ vidyād: Know it.
duḥkhasanyogaviyogam: Viyoga (separation) from the union (union) of sorrow.
yogasanjnitam: This is called yoga.
sa nishchayena: That with firm determination.
yoktavyo: One should practice.
yoga: Yoga.