First introduced in Star Trek: The Next Generation, the holodeck (technically called the Holographic Environment Simulator) is a virtual reality system that can recreate almost any simulated environment stored in the ship's computer in the form of holo-programs.  The Holodeck consists of two main sub-systems - the holographic imagery sub-system and the matter conversion system. The holographic imagery sub-system creates images of incredibly realistic environments. Computer-driven holographic projectors control a series of shaped-field forcebeam projectors which are capable of giving physical substance to these holographic images, or holograms.  The matter-conversion sub-system uses transporter and replicator-based technology to create physical objects for use in the simulation from raw material. The Holodeck also generates life-like simulations of humans and other life forms. 

The Enterprise-D holodeck
Holograms are actually apparent images with three-dimensional structure and are well-developed technology today. Large-scale holograms, illuminated with lasers or displayed in a darkened room with carefully directed lighting, can produce absolutely precise, three-dimensional images of real objects. Basic conventional holographic systems consist of a laser (usually red helium-neon); lenses; a beam splitter; mirrors; and holographic film.  However, researchers at MIT's famous Media Lab have developed electro-holography systems that uses powerful computers to direct lasers to generate complex full colour, full-motion, interactive 3D-images. The system can generate dynamic images that exhibit all of the visual sensations of depth and realism found in physical objects and scenes at nearly the same speed as video. A robotic device will let viewers actually interact with the hologram where, for example, a car designer would create a 3-D shape for a car and manipulate it  so that the viewer can reach into the hologram, touch it, and change its shape.