The kinetic theory model says that all matter is made of tiny particles that are always moving. How the particles are arranged, and how they move, decides whether a substance is a solid, a liquid or a gas.
In a solid the particles are packed closely together in a regular pattern. Strong forces hold them in place, so they cannot move around. They only vibrate about fixed positions. This is why a solid keeps its shape and its volume.
In a liquid the particles are still close together and touching, but they are arranged randomly. They can slide past each other, so a liquid flows and takes the shape of its container. A liquid keeps the same volume.
In a gas the particles are far apart and there are almost no forces between them. They move quickly in random directions, so a gas fills any container. It has no fixed shape and no fixed volume.