If you jus want to program stuff with GUI's you'll want to look more specifically at a toolkit gtk, qt, or something like that. If you really want to know about the stuff deliverd with the X server you'll want to learn about xlib.
For xlib programing take a look at these sites.
Also you might want to take a look at "Xlib Programming Manual (O'Reilly & Associates, Inc.)" It's a bit old, but many of the basic concepts havent changed much. You can probably find a copy at a library somewhere.