On the television show "Star Trek", the USS Enterprise (NCC-1701) is a fictional starship in the fictional Star Trek universe that serves as both the main setting of the original "Star Trek" television series, as well as the primary transportation method for the show's characters. Prior to the late 24th century, we are told that federation starships were not equipped with holodecks (fictional plot devices used to create staging environments where participants could engage with different virtual realities).

According to 'The Star Trek Encyclopedia' in the 23rd century, Constitution-class starships such as the Enterprise had a recreation facility (Rec Deck) with at least six recreation rooms (rec rooms) spaced out across the length of the ship. In 2270, when of the recreation rooms aboard the USS Enterprise were equipped with a holographic projector, it was a move towards the holodecks of the 24th century.

A Holographic Environment Simulator, or holodeck as it is most commonly referred to, was a form of holotechnology designed and used by the United Federation of Planets, Starfleet which ran the holographic programs. They were installed aboard starships, space stations, and at Starfleet institutions for use in entertainment, training, and investigative purposes.

More Info: memory-alpha.wikia.com