All matter exists in one of three states: solid, liquid or gas
In a solid, the atoms/molecules are tightly packed in a regular lattice pattern. The bonds between the atoms/molecules are strong and individual particles do not have enough energy to escape from the lattice. This is why solids have fixed shapes. The particles are not still - they vibrate within the lattice - but they cannot break free from it. If the solid is heat, the atoms/molecules in the solid vibrate more. The solid expands.
When a substance is given more energy - usually by heating - the particles vibrate more and more. If they are given enough energy they will be able to escape from the lattice structure – the bonds between the atoms/molecules will break. If the bonds are strong more energy will be required to break them. Typically ionic bods are stronger than covalent or metallic bonds and need more energy to break - and it will start to break down. The substance has then become a liquid. Liquids have no regular structure, unlike solids. They can flow and they take up the shape of their container because the particles are able to move freely while still remaining in contact with one another. Because the particles are still in close proximity with each other, the liquid cannot easily be compressed to take up a smaller volume.
If even more thermal energy is put into the substance, then the particles move more and more freely until they can escape the bonds between them completely. The substance has become a gas. Gases spread out to fill whatever space is available because the particles are free to move right away from each other. Gases can be squashed because there is so much space between the particles. Typically gases might be one thousandth the density of liquids or solids.