Wavelets are an alternative basis space. There are infinitely many wavelet bases (Daubechies, Haar, Mexican Hat, “Spline”, Zebra, etc), but their primary feature is that they are localized. Fourier basis functions span all space (from negative to positive infinity). Wavelets are basically individual pulses of waves (at various positions and scales).
Their value in compression stems from factors like the grouping which generally shows that a good 90% of the data is modelled by the low-pass filters, with the high-pass filters generally showing very small values that are mostly details. (of course, this is not true if the source is noisy in the first place). For images, the greatest value comes from localization of the basis, which means that we can model discontinuities (e.g. edges) VERY well with wavelets. You will NOT get those weird JPEG halos if you use wavelets.