Pressure plays a very important role in changing the physical state of matter.
By varying the pressure liquids can be changed into solid and gases can be changed into liquid.
Gases when subjected to high pressure gets compressed into a small volume and when we lower its temperature it gets liquified.
This happens so because there is lots of space between the particles of a gas and upon applying high pressure particles are brought close to each other which upon cooling gets liquified.
By this process ammonia gas can be liquified.
If the pressure is furthur increased, liquid state can be changed into solid state.