A DTD is the Document Type Definition. In other words, it's the set of rules for tags in XML markup. It defines what the tags are and what they mean. These can be different depending on the XML document. For example, if we were going to print an XML recipe in a recipe book, we would define the look of each of the elements in the DTD: the title might be bold and +2 in font size and the list of elements might be an ordered list.
But if we want the computer to actually make the recipe, we don't care what the markup looks like, only how our cake turns out. In that case, the DTD might define the ingredients as food that it would look for in an inventory and the list as the instructions it would follow to create the meal.

