How do 3D printers work?

Not long ago, the idea of printing three-dimensional objects at home might have sounded like a thing out of The Jetsons. So how do 3D printers work, anyway?