The holodeck is a room aboard starships that uses holograms, forcefields and replicated matter to create fully interactive simulated environments for training, research and recreation.
Holodecks combine holographic projections with forcefields and replicated objects so that people, places and props look and feel real. Crews use them for exercise, tactical training, scientific modelling and entertainment, from Sherlock Holmes mysteries to historical recreations. Safety protocols normally prevent users from being seriously harmed by the simulations.
An early recreation room aboard the original Enterprise was capable of similar simulations, and the Enterprise-D offered holodecks as standard. When Data and Geordi La Forge played a Holmes mystery, a computer-generated Professor Moriarty gained awareness of his own existence and later returned to demand his freedom.
The technology carried risks. Reginald Barclay retreated into holodeck fantasies, safety protocols were sometimes disabled, and the Hirogen once turned much of Voyager into a holographic battlefield. Such episodes raised lasting questions about the rights of sentient holograms.