Patanjali now explains how even pleasure is in fact pain only,
Parinaamataapasanskaaradukhairgunavrittivirodhaachch dukhamev sarvam vivekinah
Dukhaih: The three kinds of pains
Guna: The three gunas – Satva, Rajas, Tamas
Vritti: The modifications
Virodhaat: Conflict arising out
Dukhamev: Just pain only
Vivekinah: For the enlightened
The pain arising out of parinaam, taapa and sanskaar as well as conflicting nature of the three gunas, all of these are pain only to the enlightened.
Parinaam Dukh: Every action has an equal and opposite reaction said the vedic rishi and agrees modern science. Every bhog has a rog attached to it. The more the pleasure, the more is the pain experienced as an equal and opposite reaction. So what is perceived as pleasure, is actually pain only which will fructify later. This is parinaam dukh.
Taapa Dukh: Every pleasure is temporary, it is bound to end. The moment you get something, the day it will leave you is decided. This fear of losing that which is dear to you causes pain even as you are enjoying that pleasure. Also no matter what you get, there is always something better. That better, which someone else has, causes jealousy which leads to further pain on account of pleasure. Also, the lack of a pleasure that you desire, causes pain. All these three are taapa dukh.
Sanskaar Dukh: All the pleasures that one goes through, get etched in the being as impressions and remembrances. When those pleasures leave (and leave they will), one experiences pain while remembering them. For example, a person who has loved sweets all his life becomes diabetic after a point of time and can no longer eat sugar and experiences pain remembering the pleasure it brought him.
Guna Vritti Virodh: The three gunas of satya, rajas and tamas are active in a being at all times and work in opposition to each other. For example, while satva relates to light, gyan and bliss, tamas is associated with darkness, ignorance and sadness. Due to activity of the three gunas, even while experiencing pleasure, a being is not at peace, and experiences pain and grief. Therefore that too is a pain.
All the above four are pains which an enlightened person understands or experiences. Therefore, for him/her, all results (whether pain or pleasure) of action are in fact pain. The key hence is vairagya.