What is the difference between a well formed XML document and a Valid XML document?

Well-formed XML means that the XML is correct (it has only one root node, and all elements match an end element tag)

Valid XML means that the XML can be validated to an XML Schema or DTD, and that all the tags in the XML are also in the Schema or DTD, and in the right place.