In Star Trek, the technology that creates food, clothing and other objects from stored patterns is the replicator.
A replicator uses matter and energy to produce an object based on a digital pattern. On Federation starships and stations, it can prepare meals, beverages, clothing and many routine items on demand. Users select an item through a computer interface, and the machine reconstructs it from available matter.
The technology is closely related to the transporter because both rely on the conversion and reconstruction of matter patterns. However, a replicator generally creates a new object from a stored pattern rather than moving an intact object from one place to another.
Replicators are not portrayed as unlimited magic. They have energy and raw-material constraints, and some complex substances, living organisms and valuable materials may be restricted. The series also distinguishes replicated food from traditionally prepared food, with characters sometimes preferring meals made from original ingredients.