this can be explained by studying the following things:-
1 Gases :- The forces of attraction in the gaseous state is very less, so the particles are free to move. the particles have a lot of space in between them.
2 Liquids:- The forces of attraction in the liquid state is more than gases that’s why the particles can flow only in the limits as the water can not come out of container. These are not tightly packed. But still the liquids can flow easily.
3 Solids :- Solids have larger forces of attractions and particles are tightly packed in the space. Then forces of attraction keeps a good hold on particles and do not allow to move freely.