Applescript question

I modify applescript “OCR with pdfpen” to suit my workfolw, it works fine now. But I do not understand some parts of script below

it seem that no function call these two parts

macOS calls the open handler if you have saved the script as an application and drag and drop files on it.

macOS calls the adding folder items to handler if you have attached the script to a folder and add files to the folder.