Freeze-drying has been around for ages -- indigenous people in Peru put potatoes out in the frost to freeze them and then let the intense sunlight dry them. It's an ingenious way to preserve food and other things too. During World War II, freeze-drying was used to send biomedical products like serum, which would otherwise need refrigeration. But eventually the idea turned back to preserving food, too. Once you freeze-dry food (often done with dry ice or nitrogen, then heated under a vacuum), you end up with flakes, cubes or bars of a porous, lightweight material. Then you can rehydrate it using cold or hot water, depending on the food and what temperature you wanted it to be. One issue is that rehydrated food never tastes or has the same texture as the original food.
That's just one way that food was preserved for astronauts and cosmonauts during space missions. They also ate pureed and concentrated foods out of toothpaste-like tubes. We were so excited about our space missions that we wanted to emulate the astronauts in their eating, too. Some of the future kitchen designs included special ways to rehydrate or otherwise cook with food concentrates. Really the only things that took were freeze-dried ones, though -- we still use plenty of freeze-dried products, like instant coffee. But they haven't replaced whole foods. You can find novelty items like astronaut ice cream and Space Food Sticks (a sort of precursor to energy bars) at museums and space-related sites today. The ironic thing is that the freeze-dried, Neapolitan-flavored ice cream only went up on one mission because it proved to be unpopular.