If there is space, the container will move. It will also change the center of mass as the liquid splashes around.
If there is no space and the container is full of liquid, other answers describe what happens.
This is important when transporting liquids on boats. If the liquid can move around, the motion can flip the boat. Containers get designed to minimize the chance of that happening.