MIDI files contain no sound. Repeat, MIDI files contain no sound! They contain only performance data.
In years gone by, player pianos played music by "reading" holes punched in a roll of paper. You could hold that paper to your ear all day long and never hear any sound from it. That's because the paper was only a conveyor of information. It told the piano what notes to play, but the piano did the actual playing.
MIDI files are the piano rolls of the electronic age. They contain no sound, but tell the computer or electronic keyboard what to play.
Imagine a guy playing your favorite song on a keyboard. By pressing the keys, he's "telling" the keyboard what notes to play and how long to play them.
Now imagine the guy being replaced by a computer. The computer sends signals to the keyboard that tell it what notes to play and how long to play them. These are MIDI signals.
Now imagine the keyboard being replaced by your computer's sound card. When playing MIDI, a sound card is acting like a little keyboard in your computer. The MIDI file is "telling" it what to play.
Now imagine someone taking the guy's keyboard away and replacing it with a different model. This new one might have a better or worse sound than the first one. Likewise, a MIDI file will sound a little bit different when played on another person's sound card. It just depends on what kind of card he or she has.
Advantages of MIDI files
MIDI files are tiny, often 10K or less. They download from a web page in no time and fit easily on a floppy disk. MIDI files are ideal any time you want music to start playing immediately.
Disadvantages of MIDI files
Because they sound a little different when played on different sound cards, there is no guarantee that those lush horns won't sound like blaring trumpets on the next guy's machine. Making universal MIDI files is a combination of art, skill, and experience.
Digital audio files are like tape recordings. They store every yelp, screech and caterwaul exactly as you make it, then reproduce them on playback, no matter what kind of machine they are played on.
Advantages of audio files
They can reproduce exact sounds with better-than-CD quality, including all yelps, screeches and caterwauls.
Disadvantages of audio files
They are HUGE! They can take up 10MB or more per minute of sound. Even with high-speed Internet connections, a simple audio file can take several minutes to download.
On the web, audio files are best used as streaming media, where the user clicks to hear a selection as it comes down, saving the trouble of waiting for a long download. Even so, the size of these files, especially when combined with video, can cause problems.
What About MP3?
MP3 is an audio format which takes all the frequencies only your dog or your pet elephant could hear and removes them. It also removes certain background sounds that you could hear, but would probably not be aware of. Then it compresses what's left, much like other files are "zipped," for faster download.
MP3 is an attempt to combine the small size of MIDI files with the high quality of other audio formats. The quality of MP3 files makes some recording engineers balk, and they are still larger than MIDI files, but they provide a good compromise that most people are happy with. That's why they are the most popular choice for casual listening.