An MP3 file is an audio file that uses a compression algorithm to reduce the overall file size. ... While a 3-minute lossless file, such as Waveform Audio file (WAV), can be around 30 MB in size, the same file as a compressed MP3 would only be around 3 MB. That's a 90% compression that retains near CD quality.
An MP3 file consists of MP3 frames where each frame consists of a header and a data block. The frames are not independent and cannot usually be extracted at arbitrary frame boundaries. The data blocks of file contains information about the audio in terms of frequencies and amplitudes. The sync word in the header identifies the beginning of a valid frame. This is followed by 3 bits where the frist bit shows that it is an MPEG standard and remaining 2 bits show that layer 3 is used; hence MPEG-1 Audio Layer 3 or MP3. After this, the values will differ, depending on the MP3 file.ISO/IEC 11172-3 defines the range of values for each section of the header along with the specification of the header. Most MP3 files today contain ID3 metadata, which precedes or follows the MP3 frames, as noted in the diagram. The data stream can contain an optional checksum.