The two factors on which states of matter depends are:
(A) Inter-particles forces of attraction.
It keeps the particles together also called intermolecular forces.
(B) Thermal Entergy: It is the energy passed by matter duet to heat energy.
It increases the kinetic energy and hence tries to keep the particles apart.