The functioning of a small liquid nitrogen machine relies on the liquefaction process of nitrogen gas. The machine compresses the gas to a high pressure and cools it down with a heat exchanger, causing it to condense into liquid form that can be stored and utilized for various purposes.