To do this, MIT students Kyle Hounsell, Kristine Bunker, and David Donghyun Kim built an extruder that was chilled by liquid nitrogen. This kept the soft serve ice cream cold as it piled on the build plate.
This kind of project never goes right from the beginning. It's a new technology with unfamiliar challenges. So the team had to eat a lot of excess ice cream from failed projects, which presumably tastes better than PLA filament.
Much of the credit, though, should go to cartoonist Chris Hallbeck who first conceived of the idea of an ice cream 3D printer.