Slightly orthogonal to this: is there a good tutorial on writing your own simple Xserver?
Last time I checked it was work in progress and I'm not sure how complete it is at this moment, but it includes understandable explanations of the low-level algorithms and acceleration structures involved.
Edit: this shows how X works from the lazout and graphical side. One interesting thing that is not covered by this is the somewhat peculiar wire format of X11 connection (it was obviously designed by someone with LISP background).