Sound has these dimensions: amplitude, frequency, and phase. The human ear can only hear a spectrum of amplitude (1000 Hz - 5000 Hz) and frequency (20 Hz - 20 kHz).
Mp3 and other lossy formats generally try and remove at a minimum what the human ear cannot hear but often will remove more, lossless formats like flac do not remove anything.
Almost all formats include compression, because you can compress files without data loss.