X usually refers to the X Window System, currently at Version 11 Revision 6. Hence often also refered to as X11, or X11R6.
This X11 is not to be confused with MacOS X which is also often just called "X" by Mac afficiandos.
Xlib is a higher level interface used by most applications to communicate using the X protocol. Tk emulates many Xlib functions on platforms that don't have X11.
References