XML is a markup language that structures, stores, and sends information. It allows users to define their own tags for structuring data. There are two major types of XML databases: XML-enabled databases that map XML to a traditional database, and native XML databases that use XML documents as the fundamental unit of storage. XML documents must follow rules like starting with an XML declaration, having a root element, and properly nesting elements. Common ways to query XML data include XPath and XQuery.