Complex sentence: In this case, the application supplies (a reference to) a specific custom callback function for the operating system to call, which then calls this application-specific function in response to events like mouse clicks or key presses.
Split into simpler sentences: In this case, the application supplies (a reference to) a specific custom callback function for the operating system to call. The OS then calls this application-specific function in response to events like mouse clicks or key presses.