callback functions: a function passed to another function which initiates an activity. Please look on this MDN link for examples.
processing loop: Also known as a message loop or event loop, this continuously takes the highest priority message/event on the queue and calls the associated callback function that was registered earlier to handle the event/message.
This processing loop may receive messages/events sent from:
- native system I/O calls to handle things like reading from the local file system
- events generated in a web browser from a user clicking an HTML element on a web site.
We can go deeper into a discussion of the tradeoffs associated with this type of system, however, I believe that is a separate conversation.