Audacity Project Format
The Audacity Project Format is used by Audacity to store all the data related to an Audacity project - tracks, clips, envelope points, etc. As well as the .aup file, Audacity also stores a number of .au (lossless, uncompressed, PCM audio data) files in a folder entitled $PROJECT_data (e.g. if the project file is called "first_project", the sub-folder will be called "first_project_data").
The format appears to have gone through at least three iterations. The first is created by Audacity v1.1.x or earlier and is no longer supported - the official manual suggests exporting each track as a WAV file using the appropriate legacy version. The second is created by Audacity v1.2.x and can be opened by recent versions of Audacity, but if saved will no longer be openable by v1.2. Finally, the third version of the format is created by versions of Audacity from v1.3 to current.
Audacity 3.x introduced a new project format .AUP3 Upgrading Audacity 2.x to 3.x
Audacity 2.x project files are stored in an XML format using the root tag
Audacity 3.x project files are based on an SQLite database.