XCB, an "X-protocol C Binding", is a library for marshaling X Window System network protocol requests and responses
Xlib is a library used to communicate with X11 servers
"Xcb presents a more direct view of the protocol than xlib does so you often have to look at either the protocol specs or xlib source code to find out what the underlying protocol request is to find an equivalent"
from question "XCB equivalent of XkbSetDetectableAutoRepeat"
"Xcb is simpler to use has a better response to a multithread environment but lacks documentation while xlib is a more dated complex tool better documented and fully implemented"
from question "Is XCB ready for production use? Should I use Xlib instead?"
"Xcb is lower level than xlib and allows you to minimise the number of round-trips to the x server leading to lower latency"
from question "Xlib is old? do developers use xlib framework? It was developed in 1985"