A cave or cavern is a large open underground space.
In 2266, a USS Enterprise landing party on K-G rested in a cave after escaping from the hostile native plants. (TOS comic: "The Planet of No Return")
In 2267, pirate captain Ben Cannon took up residence in a cave on Taos IV when he was stranded there by his own men. (TOS comic: "The Flight of the Buccaneer")
In the 2260s, Doctor Rycho maintained a group of Mortard robot servants in an underground complex within a cave on Raylo. (TOS comic: "Rescue at Raylo")