DataSource is a connection factory for use by applications. It's usually accessed by looking it up in jndi. It provides a simple interface that neatly conceals many things going on behind the scenes.
XADataSource is an interface for use by app servers. IMO it is obsolete, the jca ManagedConnectionFactory is just better. In any case, it provides a way for the app server to get to the physical connection and manage pooling, security (at least for ManagedConnectionFactory), and transactions, in particular jta/xa/2pc transactions, behind the scenes. Your app will NEVER see an XADataSource.
2pc is a fairly complicated subject with AFAIK no good accurate short and simple explanations. Gray and Reuter is the definitive book, but it's very long and not very object oriented and definitely overkill.