Of course liquids and solids can be compressed, although not as easily as gases, you just need a lot more force. Watch out for water as an example of matter during phase changes because it's a really tricky molecule. One of its more interesting properties is that it turns into liquid upon compression at certain temperatures because it is more dense as a liquid than as a solid while most all other matter is the other way around. Water has one of the most complex phase diagrams with at least 9 or 10 different phases which also has been fictionalized in Kurt Vonnegut's Cat's Cradle as destroying the earth... I believe that's the title. Also at 4 degrees celsius there's a increase in the density of water, at atmospheric pressure, that is responsible for the oceans in the colder regions of the earth to be rich in nutrients while warmer waters that never reach 4 degrees don't get these large plankton blooms... and if ice were more dense than liquid water, all glaciers would be on the bottom of the sea floor.
What the book was trying to say, I think, was that liquids and solids are not as appreciably compressed as gases are, which is why we can use liquids in hydralyics to transfer force. But just don't take it too literally. Solids are touching each other while liquids are on the order of several molecular distances away, while gases have vast distances between molecules.