To make dry ice, you start by compressing and cooling carbon dioxide gas until the dioxide gas liquifies.
Then you rapidly expand the liquid CO2, which then causes it to cool down and solidify into snow like particles.
The snow like particles are then compressed into dry ice pellets or dry ice blocks.
Carbon dioxide gas is compressed and then cooled down until the carbon dioxide becomes a liquid.
Compressing and cooling the carbon dioxide is done using industrial equipment for commercially produced dry ice.
You can also use a CO2 tank or fire extinguisher for smaller quantities.
Once the CO2 or carbon dioxide gas is compressed and cooled and becomes a liquid the liquid CO2 is then released to atmospheric pressure, which causes it to expand rapidly and cool down.
The rapid expansion causes some of the liquid to immediately transition into solid form, which creates CO2 snow.
The CO2 snow is then collected and compressed into pellets or blocks of dry ice which is a process that can be done using specialized machinery or by hand in smaller setups.
Dry ice is very cold with a temperature of -109.3 F and can easily cause frostbite, so you have to properly handle and store it.
Dry ice should be stored in well ventilated areas and not in any airtight containers, as the sublimation process, "solid to gas", can create pressure and potentially cause explosions.
Anyone can buy dry ice, although some sellers of dry ice may require you to be at least 18 years of age.
Dry ice can be purchased at chain grocery stores and super stores such as Walmart, Safeway, Whole Foods, Albertsons, Kroger, Publix, HEB, Wegmans and even Costco.
Even some larger gas stations such as Sheetz and 7-Eleven also sell dry ice.