The balance between intermolecular forces and kinetic energy
Explanation:
If the kinetic energies of the particles are not strong enough to overcome the intermolecular forces, the particles will be locked in place in a crystal lattice. The substance will be a solid.
If the kinetic energies of the particles are slightly stronger than the intermolecular forces, the particles will be able to slide past each other. The substance will be a liquid.
If the kinetic energies of the particles are much stronger than the intermolecular forces, the particles will be escape completely from the attractions of their neighbours. The substance will be a gas.