In Javascript there is a possibility to define a function X and pass it as an argument to another function Y.
Such a function X is called a callback function
Helps for Asynchronous function calling. Rather than waiting some function completes you can call and pass the callback to an asynchronous function and continue the current execution. Once the function completes it execute the call back. Ajax uses callbacks. This explains how Ajax uses callbacks clearly.
Here are some similar threads.
Why use callback in JavaScript, what are its advantages?
How can I take advantage of callback functions for asynchronous XMLHttpRequest?