Lossy Compressed formats work by throwing away information that is useless, such as audio frequencies outside the realm of hearing.
FTFY.
I can't really comment about the technical details of how any of them works, but any LOSSLESS compression will yield the same audio result. I would be surprised if ALAC actually guesses about anything. If it did, it wouldn't be lossless.
Lossless compression is more or less like incorporating LZW, ZIP or RAR into the file format - it doesn't change the uncompressed data in any way. Lossy compression, on the other hand, like JPG and MP3, DO alter the final uncompressed data from it's original state. How much they alter is highly variable based on the settings used. Higher compression = smaller files = greater change from original state. Lower compression = larger files = less change from original state.
Here's a screenshot similar to yours that started with an uncompressed PNG on my desktop.
First, a barely-compressed 48K JPG - 100 on photoshop's quality slider (which amusingly is LARGER than the lossless-compressed, 34K PNG):
Next, 50 on the slider, a 15k JPG:
And finally a minimum quality, 0 setting, 7.6K JPG:
Lossy compression isn't evil - overdone or poorly configured lossy compression is.
To the OP - as many others have said, ALAC is better than WAV; it should deliver the same audio fidelity as WAV but offers benefits over WAV. Lossless compression similar to FLAC but with better device support along with all the metadata support.