Quartz Compositor is the display server (and at the same time the compositing window manager) in macOS. It is responsible for presenting and maintaining rasterized, rendered graphics from the rest of the Core Graphics framework and other renderers in the Quartz technologies family.
The bitmap output from Quartz 2D, OpenGL, Core Image, QuickTime, or other process is written to a specific memory location or backing store. The Compositor then reads the data from the backing stores and assembles each into one image for the display, writing that image to the frame buffer memory of the graphics card. Quartz Compositor only accepts raster data and is the only process that can directly access the graphics frame buffer.
In managing individual windows, Quartz Compositor accepts a bitmap image of the window's contents from its renderer, along with its position. The choice of the renderer is up to the individual application, although most use Quartz 2D. Quartz Compositor then acts as a "visual mixing board," by adding the given window to the whole scene for the display.
In its role as the window manager, Quartz Compositor also has an event queue that receives events, such as keystrokes and mouse clicks. The Quartz Compositor takes the events from the queue, determines which process owns the window where the event occurred, and passes the event on to the process.