The gas can be liquefied by:
By lowering temperature, the energy of surroundings become less than that of the gaseous particles. Then there is a transfer of energy from gas to the surroundings. Thus the gas molecules lose energy and get converted to a liquid state.
By raising pressure, the particles of gas come closer and closer and get converted to a liquid state.