Unless you've been living away from civilization (or unless you're an old man who steadfastly believes Computers Are Bad, in which case, what are you doing here of all places?), chances are you've at least heard about MP3. We see it everywhere on the Internet, our portable music players use MP3 audio instead of those good ol' cassettes, all phones can play audio encoded in the MP3 format, the street dealers from around the block probably sell DVDs packed with songs in MP3, and your car's sound system can probably play MP3s from your iPod, CD, or a USB drive.
MP3, more than a simple audio format, is a lossy, frequency-domain, quantized audio compression algorithm. The name is short for MPEG-1 Audio Layer 3, where MPEGnote is a group of companies developing these sorts of audio and video compression methods. In English: MP3 is a list of step by step instructions that can be followed by a computer program (algorithm) that takes an uncompressed audio file, typically of the same format used in an audio CD, cuts the waveform into about 40 split-second snippets for each second, calculates the frequency components of each snippet (the frequency domain), uses these components to remove parts of the information contained in the sequence (some information is lost in the process — hence lossy), rounds up the frequency components to some pre-defined values (quantizes them), and encodes the resulting information in a way that takes up less space than the original audio file (compresses it). So far, nothing unusual: There's many other lossy audio compression techniques out there, and many of them already existed in 1994, when the MP3 format was released.
However, there's one difference between MP3 and the other formats of the day: The part that removes information from the sound sequence was specially designed to remove only the sounds the human ear and brain can't hear. This is due to something known as psychoacoustics. Basically, this means we don't hear a soundwave exactly as it comes out of an audio source: our ear is much more sensitive to medium-frequency sounds than it is to bass and treble sounds, and our mind subconsciously filters out the background noise and amplifies the ones we want to hear. This is why you can't seem to hear anything when you record a video in a classroom: your mind filters out the classroom's chatter and lets you focus on your friend's voice, but the microphone can't do this, and just picks up all the environmental sound., allowing more precise representation of the frequencies that are not dropped.
So, to continue the analogy started on their pages: if a MIDI file is just sheet music, a WAV file is an entire orchestra, an MP3 is half an orchestra. You know all the pianos and clarinets and timpanis and stuff that aren't being used by this song? MP3 leaves 'em behind.
Thanks to its psychoacoustic model, MP3-encoding can strip a lot of this information from the audio, and yet it still sounds pretty much the same as the original source to most people. As a result, a medium-quality song encoded into MP3 takes up very little space — usually 4 MB note , much less than the 30-60 MB they usually take on a CD. Back in 1995, when hard disk capacity and internet bandwidth were at a very great premium (modems rarely went beyond 28 kbps, and a CD could hold two medium hard drives), an audio format that could turn a massive file into a very small file was obviously the best choice to save your songs. Another very important reason is that MP3 decoders are very efficient: they use very little CPU time and very little memory, and can run on very small hardware, e.g. a computer from 1994, a portable MP3 player, a mobile phone, or a gaming console. Of course, the intertubes and the earliest file sharing networks (Napster, Audiogalaxy, Kazaa), and the marketing of the iPod as a fashionable device played a very big part in MP3's popularity.
There are many other compression formats out there, some of them born out of legal conflicts between patents and free/open-source software, some of them are actually better, some of them lossless (where no information is lost, quality is nigh-perfect, but the files are large, albeit not as large as raw audio). As of the 2010's, MP3 is still the most popular audio format in the world. However, FLAC, a Lossless audio format, has been trending upwards among consumers because the speakers in headphones are able to make use of the benefits of FLAC playback, making it the choice for audiophiles.
On April 23, 2017, Fraunhofer IIS/Technicolor, the inventor of the MP3 format, have announced that the MP3 licensing program has ended due to various patents on MP3 having expired worldwide (including the US), making the format royalty-free. However, do note that several patents reliant on the MP3 containers still hasnt expired, and one particular patent has been determined to be held by a patent troll. This means while the principles and algorithms of encoding and decoding MP3 files itself are now public domain, the container format still isnt. This means that while its okay to use MP3 audio as an audio stream in, say, a Matroska video file or Ogg audio file, it is still not okay to use the MP3 file container itself.