Each version of a file in a document library is maintained in a version list (XML data). The version history contains the current version and then each version starting with the oldest version. The versions are kept in the same export folder as the document.