At normal temperatures, of course, nitrogen is a gas. Like any gas, its molecules are spaced relatively far apart, and are moving very rapidly. Because of this, the nitrogen molecules don't interact with or attract each other. To turn nitrogen gas into a liquid, we need to slow the molecules down by cooling them. We start with air.
Air is compressed in a compressor, pushing the air molecules close together.
Then the air is allowed to flow down a tube through a chamber. For the gas to expand in the chamber, the molecules need energy. They get this energy by absorbing heat from the chamber, cooling it. The process is repeated until nitrogen begins to condense into liquid.