A replicator was a device that used transporter technology to dematerialize quantities of matter and then rematerialize that matter in another form. It was also capable of inverting its function, thus disposing of leftovers and dishes and storing the bulk material again. [Memory Alpha]
Yes, I know it's not real. We got that bit out of the way right up there in the lead. Now we can have some fun hypothesizing and waxing all futuristic like about how these fantastical infinite buffets could (stress could) be possible some day.
In fact, in the most primitive sense, there's a form of replication happening in manufacturing shops around the world right now. Called 3D printing, the technique isn't even that new, with roots extending back to the 1990s. They were really expensive then, of course, but today they're relatively ubiquitous in companies large and small. The technique is pretty simple. In layman's terms, a user creates or downloads a 3D model of real world object on their workstation, and then a special printer works to recreate that object using resin or plaster or plastic or whatever the material may be. Voila. Instant prototype, and you can have all the tchotchke trinkets your heart desires, on demand, beamed to you from anywhere in the world.
But you can't eat a resin hamburger. And you can't drive the mockup that just got spit out of your rapid prototyping rig. The replicator could do both these things.
What we need is something that physically assembles atoms and molecules into tasty shapes so we can tell some uber supercomputer with a soothing female voice to get us some Tea. Earl Grey. Hot. Oh, and it has to create a little glass cup for us to drink it in too (Quick trivia: What did Picard do with all those dirty dishes? Answer above!).
This is where things get a bit sticky (food!), exciting (recent discoveries!) and depressing (its a LONG way off!) all at once. Theoretically, people are debating and thinking about "molecular assemblers" right this instant. In fact, these hypothetical machines would implement some form of nanotechnology, which is already used in everyday items like batteries, fuel technologies and even bikinis. Hell, there's a Wikipedia page for molecular assemblers up right this instant—our replicator must be right around the corner, right?
Unfortunately, current nanotech implementations are almost what I'd call "dumb" deployments of the technology. We're just coating a material with some nano bits to repel liquid; or we're placing nanorods in a battery to improve efficiency... nothing, in other words, that would have Geordi doing a double take. Certainly not that Wesley Crusher kid either, for that matter (More asides: Wes, my man. Your replicators could produce anything you wanted—what the hell was up with that rainbow jumper?!).
But there is some hope. As recently as November, scientists had silver nanoparticles self-assembling into specific structures. Now, Guinan can't serve us up a plate of silver, so that doesn't really count as a replicator just yet, but it does drive our research in the right direction. The same direction that saw IBM scientists imaging molecular bonds for the first time ever on Thursday:
By "seeing" these bonds scientists think they can better understand how to manipulate them. For IBM scientists that means quantum processors and such in the far future. For guys and gals like you and me, it might mean snacks on demand as we start to understand why snacks look and feel the way they do on the molecular level.
While we're down at the molecular level, I'd be remiss not to mention the nano pinhole camera some enterprising Russian scientists created in June:
In their atom pinhole camera, the atoms act like photons in an optical pinhole camera, but instead of light traveling through a lens, it travels through a pinhole on a mask and creates a high-res inverted image on a silicon substrate. This camera is capable of resizing nanostructures down to 30 nm-10,000 times smaller than the original. So, a camera with say 10 million pinholes could produce large numbers of identical (or diverse) nanostructures simultaneously.
It's the most promising "replicator related" discovery in recent memory, but even so we joked that the Giz crew would probably be slurping pureed baby food and soiling our adult undergarments by the time it came to fruition. Still, the research is there, and every month IBM or the CERN folks or someone else who's much smarter than I am is firing off a new research paper about manipulating the world of the very, very small.
The replicator, in short, would be a paradigm shift the likes of which the world has never seen. Famine? Potentially gone forever. Shortages? See ya. Alinea? Probably the first place to get one. You and I? Optimistically speaking, we'll probably need some Depends by the time one comes along. Silver lining is we can crap to our hearts content and dispose of the mess in our replicator. Then it's lunch time!