Midi is a music file format widely used for keyboard instruments. It records the actual key presses, their strength and duration. It is an extremely compact way of storing audio. There is more information in the Wikipedias article on Midi
Midi and Audacity
Experimental versions of Audacity have some basic Midi support, but it is not yet (as of end September 2007) available in mainstream Audacity. We do not currently have developers working on it. There are alternative and excellent Open Source tools for midi sound. One such is Rosegarden.
Converting from Midi to other formats such as wav is fairly straightforward, though the quality of the conversion may depend on the library of musical instrument notes. Converting in the other direction is an extremely challenging research problem. We'd be very interested in helping a developer who has made progress with such software in helping it reach a wider audience through Audacity.