A callback function is a function that is passed as an argument to another function. It is called (or "executed") when the event that it was passed to occurs. Callback functions are often used to execute a certain task after an asynchronous operation has completed.