A callback is a programming concept where a function is passed as an argument to another function. This allows the first function to be executed at a later time, often after a specific event or condition is met. Callbacks are commonly used in asynchronous programming, enabling tasks like handling user interactions or waiting for data to load without blocking the main program flow.
In languages like JavaScript, callbacks help manage operations such as API requests or event handling. When the operation completes, the callback function is invoked, allowing developers to define what should happen next. This approach enhances code organization and responsiveness in applications.