There are MANY different such machines, and they produce imperfect parts with different characteristics.
Basic methods are--
SLA - stereolithography, where a laser polymerizes a liquid and it emerges from a bath of liquid like the creature from the black lagoon
FDM - fused deposition modelling- sort of an automated glue gun lays down layers. Eg. Stratsys.
LOM - laminated object manufacturing- a roll of plastic is cut with an automated knife to create layers of the end product
SLS - Selective laser sintering (of powder). This has been combined with inkjet color printing to produce colorful 3-D object. Metal powder is possible.
Google for "Rapid Prototyping" and you'll find more info, machines, service bureaus etc.
Part finish and material bulk characteristics are rather inferior to solid material in every sense (strength, porosity etc.) and it's possible to make structures that are not machinable and not injection moldable (eg. with complex internal voids etc.).
If you don't mind doing a bit of work afterward (polishing, drilling, filing, painting etc) you can get a fairly good idea of what an injection molded part will look like before spending the money for a mold-- even demonstrate functional prototypes at trade shows etc. Ideal for 'industrial engineers' interested in cool sculptured shapes etc.
I'm currently using several different methods (through service bureaus) to create small quantities of plastic and metal parts for high tech applications. I do the modelling in Solidworks, output an STL file, send it off, and parts arrive by courier in a bit.
At the other end of the spectrum from DIY home stereolithography,
Space explorers have yet to get their hands on the replicator of "Star Trek" to create anything they might require. But NASA has developed a technology that could enable lunar colonists to carry out on-site manufacturing on the moon, or allow future astronauts to create critical spare parts during the long trip to Mars.
The method, called electron beam freeform fabrication (EBF3), uses an electron beam to melt metals and build objects layer by layer. Such an approach already promises to cut manufacturing costs for the aerospace industry, and could pioneer development of new materials. It has also thrilled astronauts on the International Space Station by dangling the possibility of designing new tools or objects, researchers said.