Dear Student,
In liquid and solid states, molecules are already in close contact, therefore they resist further compression; as that would result in the increase of repulsive interactions because of electron cloud. A solid is something that can hold its own shape and is hard to compress.The particles in most solids are closely packed together. Even though the particles are locked into place and cannot move or slide past each other, they still vibrate a little.In most liquids, the particles are less densely packed, so they can move around and slide past each other. While a liquid is easier to compress than a solid, it is still quite difficult – imagine trying to compress water in a container.So,liquids and solids are hard to compress.
Regards.