The main factors responsible for the difference in the state of matter are:
1.Temperature
2.Pressure.
As the temperature increases, the atoms of the substance tend to gain more kinetic energy which in turn largely determines the state of the matter. The same applies for pressure.