Custom library or custom.pll give the programmer a flexibility to add code on allowed custom events . As custom .pll is general for all the forms that open in application , you have to specify in you code , the exact form name , block name , item name and event name where the code should execute.
However not all the events are supported in custom .pll but you can very control the behaviour of object and add logic to some extent with the help of custom .pll coding. For more information please refere Oracle Applications Developers Reference Manual