Attachment
Here, the all knowing master (Tsong-kha-pa) says,
Attachment is a hankering after any pleasurable external or
internal object by taking it as pleasing to oneself. For example, just
as it is difficult to remove oil stain from a cotton cloth, in the same
way, this hankering after and getting more and more involved with the thing
makes it very difficult to get rid of.
Attachment is threefold:
1. Attachment on the sensuous level
2. Attachment on the aesthetic level
3. Attachment on the non-formulated level
The Abhidharmakosa explains it as attachment to sensuousness and attachment
to possible existences and speaks about the latter by combining the two
higher levels into one.
Attachment on the sensuous level is sustained interest in and attachment to the five desirable qualities such as color-form, sound, etc,
The combination of the two higher levels into one and calling it 'attachment to possible existence' is for the sake of removing the error that the experiences taking place on the level of aesthetic forms and on the level of formlessness are the path to liberation.
The statement, 'its function is to produce frustrations' means that,
since the foundation of all frustrations of samsara on the three
levels of existence is the whole process of being reborn into samsara,
the chief cause of the process of samsara is nothing more than the
desire for attachment.