A library was a collection of information and data stored in the form of books and other media.
In the 3rd century BC, the Library of Alexandria was constructed on Earth. (TOS novelization: The Motion Picture)
In 2375, the USS Enterprise-E had a dedicated library containing shelves of physical books as well as consoles for the access of information via the LCARS. The older books were preserved in climate-controlled shelves behind force fields. (TNG novelization: Star Trek: Insurrection)