Some of the sutras from the Yoga Sutras of Patanjali are quite simply stated, but are incredibly complicated in nature. Sutra 2.16 is just that - the sutra states that future pain should be avoided. Sounds easy right - just avoid pain.
The Yoga Sutra of Patanjali state that pain comes from the conjunction of the seer and the seen - that is of the self and the mind. In yogic philosophy (and Hinduism for that matter), the purpose of life is to separate the mind from the true self. The two are seen as separate.
So how do we avoid pain? By not identifying the mind as what makes you what you are.