GLUT defines a basic program structure - an event loop, with callback functions.
callback - a function that you provide for other code to call when needed; the "other code" is typically in a library
GLUT uses callbacks for drawing, keyboard & mouse input, and other events.
Whenever the window must be redrawn, your drawing callback is called.
Whenever an input event occurs, your corresponding callback is called.