The best way of obtaining a sample of carbon dioxide is to buy dry ice rather than gaseous carbon dioxide. Dry ice is carbon dioxide in the solid state and is created by special processes.
Put your sample of carbon dioxide into your pressure device.
High pressure is needed to transform carbon dioxide to the liquid state. At pressures below 4.5 atmospheres, carbon dioxide sublimates, which means that it passes directly from the solid to the gaseous state at -78.5 degrees Celsius.
In addition to high pressure, a low temperature is also needed to change carbon dioxide to the liquid state. While keeping the pressure at 4.5 atmospheres, bring the temperature of the sample to -56.6 degrees Celsius.
Now your sample will be in the liquid state. If you warm liquid carbon dioxide, you must continue increasing the pressure for it to stay in the liquid state. If you warm the liquid without increasing the pressure, the sample will undergo a phase transition into the gaseous state.