A Document Type Definition (DTD) is a set of rules that defines the structure and legal elements of an XML document, ensuring validity against its structure. There are two types of DTDs: internal and external, each serving to validate XML documents and define element relationships. While DTDs are simple and widely supported, they have limitations such as restricted data types, lack of namespace support, and lower extensibility compared to XML Schema.