Liquid matter has atoms that move moderately freely; this is shown that whenever you pour water into a cup, it fills the shape.
Solids on the other hand, have atoms that basically don't move; thus is because the item is purely compact, and, for contrast, putting a rock in a cup wouldn't fill the shape of the cup, it would just lie there as it's original form.
Hope this helps!