Coroutines are computer program components that allow execution to be suspended and resumed, generalizing subroutines for cooperative multitasking.