In solids, particles are closely packed in a fixed arrangement and vibrate in place, giving them a defined shape. The energy of these particles is low, restricting their movement to vibrations around fixed positions.
In liquids, particles are still close together but can slide past one another, allowing liquids to take the shape of the bottom of their container. The energy of liquid particles is higher than in solids, enabling them to move more freely while still being attracted to each other.
In gases, particles are far apart and move rapidly in all directions, filling the entire container. The energy of gas particles is much higher than in liquids, allowing them to overcome intermolecular forces and expand to take the shape and volume of the container.