The coolant is a liquid as it enters the expansion valve (yellow). As it passes through, the sudden drop in pressure makes it expand, cool, and turn into a gas (just like a liquid aerosol turns into a cool gas when you spray it out of a can)
As the coolant flows around the chiller cabinet (usually around a pipe buried in the back wall), it absorbs and removes heat from the food inside.
The compressor squeezes the coolant, raising its temperature and pressure. It's now a hot, high-pressure gas.
The coolant flows through thin radiator pipes on the back of the fridge, giving out its heat and cooling back into a liquid as it does so.