Compression can be done in a reversible way, so no information is lost. As an analogy, zip files compress computer files but can be decompressed to provide the exact original data.
As an example, if there are ten digital samples that are exactly the same (the same tone), then you can represent that as one value with a x10 to mean it is repeated 10 times. This saves space over repeating the same value 10 times. So, for example,
1245 1245 1245 1245 1245 1245 1245 1245 1245 1245
becomes
1245x10.
On playback, the compressed form is expanded to the original form.
Most people compress the data. However, compressing and decompressing the data takes CPU cycles. So, there is usually a tradeoff between level of compression and amount of CPU to be used. There are various levels of compression with FLAC, but the higher levels give very little extra compression at the cost of CPU cylces. So some mid level is commonly used. The lowest level of FLAC compression may compresses 40%, but level 6 may only do 45%, with maybe 3 times the CPU needed to do the extra compression. Why take that much more time encoding for such a small gain in disk space? Compressing takes time because the algorithm has to search for patterns. Decompressing is very quick and more or less independent of the level, since it is just interpreting the shorthand (like x10), not looking for patterns.
The 0 and 1 pattern of DSDs is not easy to compress, so it is normally just left uncompressed, although there are formats to compress it.
Hope that helps.