XML was designed to transport and store data, unlike HTML which was designed to display data. XML uses elements to describe and carry data, with tags that are not predefined. It forms a tree structure with a root element and child elements. XML is commonly used to transport data between systems and applications by separating data from formatting.