This is due to a medium-sized word, density. Density means the amount that something weighs divided by the area it takes up (volume).
Solids have more molecules per unit area than liquids, and liquids more than gases.
If you imagine the molecules as marbles, a solid would be where the marbles are all very tightly packed together, with not much room to move, in a liquid they’re ‘sloshing’ about more and are further away, and in a gas they’re very far apart.
Because how much a substance weighs is directly related to how many molecules are present, a gas is therefore lighter than a liquid or solid.
This is why if you boil a pan of water with its lid on you’ll see water condensing on the lid (as the water boils it becomes a gas, which is lighter and therefore floats above the water layer, when it hits the colder lid it condenses back to liquid again and then drips down). I had put something about ice cubes in here, but actually water is really interesting and unusual, because as a liquid it is more dense than as a solid. This is something you will learn about at GCSE, water has very unusual properties!
Great answer, Sarah. Only thing I’d have added is that in the gas the (fewer) molecules are moving faster (they have more energy) – so if they were marbles they’d all be pinging about really fast, bashing into one another and bouncing off like the balls in a pin-ball machine.
In a liquid the marbles are close together but can still move a bit , so imagine an empty plastic water bottle nearly filled with marbles and shaking the bottle about – the marbles all move around, but they can’t move very far or very fast.
Finally, in a solid the marbles can’t really move but can only ‘wobble’ (vibrate) – imagine some marbles in a solitaire set, where each marble is in a small half-hole. If you shake it gently from side-to-side, but keep it level, the marbles wobble (vibrate), but can’t jump out of their holes. If you wobble faster and faster (give the molecules more energy), then some of the marbles WILL jump out, and eventually they all will – a bit like heating a solid (like butter) turning it from a solid into a liquid.