Definition
A callback is a function passed to other code so that the receiving code can invoke it at an appropriate point.
Usage and distinctions
Callbacks may run synchronously or asynchronously. An array operation can invoke one immediately, while a click handler responds to a later event. A webhook is an HTTP notification between systems, rather than necessarily an in-process function callback.