Doctrine2 consists of two libraries: the Database Abstraction Layer (DBAL) and the Object Relational Mapper (ORM). The DBAL provides a PDO-like layer with additional features for schema manipulation. The ORM allows normal PHP objects to be persisted as database rows and vice versa by mapping object properties to table columns via annotations. The document provides examples of executing queries, retrieving schema information, altering schemas, persisting objects, and retrieving persisted objects using Doctrine2.