CSV carries no formatting, formulas or multiple sheets, and Excel often misreads its dates and encodings. XML is what many feeds, enterprise systems and older integrations require. CSV is at home in moving tabular data between systems; XML is the usual choice for document-like data, feeds and enterprise systems.
The first row is read as column names, and every row after it becomes one <row> element, keyed by those names. A header such as address.city is turned back into a nested address with a city. Numbers and true/false in the cells are written as real numbers and booleans, but values such as ZIP codes with a leading zero, phone numbers and very long ids stay text so nothing is altered; empty cells become null.