A coroutine is a general control structure whereby flow control is cooperatively passed between two different routines without returning. They are used to simplify asynchronous programming by allowing functions to pause execution and resume at a later time, maintaining state between pauses.