it is qute simple, actually. As it is a lossless compression it is basically compressing the data. data is a digital description of selected samples of analog signal, i.e. a lot of sets of figures. the more these sets are similar to each other (the more correlation they have), the more you can compress the data witout loosing anything.
for example, if you have 10 samples and only the 10th is actually different and all the 9 are all the same, and the difference from the nine sets to the tenth set is only one single bit, all you need to know about the lot is one of the nine and which bit to change in the tenth. and that is what you record or transmit. then, to playback, you uncompress, i.e. write down all your 10 samples fully (you know all you need about them) and then you can do digital to analog conversion. you have not lost anything on the way! you just did not bother to trasmit excessive info and you fully restored the original at the other end.
now, the more complex the music is the less likely the neighbouring samples will be same, they will be less and less similar to each other so you need more and more info to fully desribe them 'in short-hand' for storage and transmission (although hopefully still less than full write-down). there is normally at least some redundancy in most streams of data.
another, related, parameter that has contribution here is the spectral composition of the signal. a single sine wave needs very littel to describe it digitally. but it has no sound charater. caracter comes with coloration, which is basically harmonics and other frequencies mixed. this means more complex signal shape and more difference between samples and less predicatbility of them, less correlation between them.