A replicator (or food slot) is a device that utilizes transporter technology to dematerialize quantities of matter and then rematerialize the matter in the form of another object, such as food or equipment. By the 24th century, replicators were a common piece of equipment aboard Federation starships and facilities.
Despite replicated food and drinks being practically identical to their real counterparts, some people claim to be able to tell the difference between real and replicated foodstuffs and maintain supplies of their favorite food and beverages from more traditional sources. This may be due to the fact that molecular level resolution is used with replication, rather than quantum level resolution used with life forms - which causes single bit errors to often appear in replicated items. Federation replicators can produce a very wide variety of materials, but as a safety precaution are generally programmed not to be able to produce fatal poisons. Additionally, there are limits to replicator technology and certain complex materials cannot be replicated. Power requirements become prohibitive for larger items, which is the reason why space vessels are still constructed instead of replicated. Due to the single bit errors created by the replication process, some foodstuffs can become mildly toxic and once noted, their use is avoided in replicated dishes. (TNG episode: "Sins of the Father", DS9 episode: "Blaze of Glory", VOY episode: "Death Wish", and Star Trek: The Next Generation Technical Manual)
On the USS Enterprise-D replicator food selection was controlled by computer core subroutine C47. When a computer interface experiment conducted by Lieutenant commanders Geordi La Forge and Data malfunctioned, certain parts of the routine were replaced with some of Commander Data's programming. Among other things, food replicators on six decks of the Enterprise began producing nothing but cat food as Data had been working on new nutritional supplements for Spot. (TNG episode: "A Fistful of Datas")
In addition to the standard food and equipment replicators, Starfleet operates larger industrial replicators. Two class four industrial (CFI) replicators were given to the Bajorans to help in rebuilding efforts following the Cardassian Union's Occupation of Bajor. Twelve CFI replicators were shipped to Deep Space 9 to be given to the Cardassians following the initial Klingon invasion of 2372. The shipment, however, was intercepted by the Maquis, with the assistance of Starfleet officer Michael Eddington. (DS9 episode: "For the Cause")
However, many other races in the galaxy had not developed replicator technology and are often interested in learning about the technology. When the USS Voyager was pulled into the Delta Quadrant in 2371, the Kazon became increasingly interested in replicator technology after they observed that it could seemingly create water from the air. Later attempts to try and create their own replicators led to an accident, and the various Kazon sects then attempted to acquire the technology directly from Voyager. (VOY episodes: "Caretaker", "State of Flux")