So you pour some water in a cup. It fills up the bottom of the cup first and then fills the rest. When it is in that cup, it also has a flat surface. That's because of gravity too. When you compress something you try and take a certain amount and force it in a smaller space.
Solids are tough to compress too, but gases are easy.
When you compress something you can squeeze it so the atoms in the substance are closer together. When pressure goes up things are compressed. If you want to be a liquid you could start out as two different things. You could be a solid or you could be a gas. Each of them has a different way of becoming a liquid.