Solid substances have molecules held tightly and close together
Liquid substances have molecules moving loosely
Gaseous molecules are moving completely freely
As moleclues get further apart, i.e. As a substance changes state from solid to liquid to gas, molecules gain kinetic energy and vibrate/move more. This means they gain heat energy (the averge energy a substance has) so the temperature increases
Substances exist in different states at different temperatures and different substances will exist in different states at the same temperature. This is to do with the forces between molecules and how much heat (energy) is required to break them