a runloop is basically an extended while loop that works like C select call.
it is responsible for getting events from its sources and dispatching those. mouse clicks, window moves, timers, stream events, ...... anything can be a runloop source.
thats the gist. read more about it in the countless dupes this has on SO or in the apple docs :)