(covers information from several alternate timelines)
A library was a place where information, usually in book or computer form, was stored and accessible to others. Usually the books were grouped by genre (fiction, non-fiction, history, etc.) and then sorted alphabetically by the author's last name. Librarians worked in libraries to assist those with information needs.
In 2152, Captain Jonathan Archer was taken to the 31st century by Crewman Daniels, where the two were trapped due to the changes to the timeline. While there, Daniels led Archer into a library (with books, not on computer), to confirm that any trace of the United Federation of Planets had been erased from history. Archer, while looking over the books, noticed one called The Romulan Star Empire, but Daniels made sure he didn't look at it.
While Kolos was serving his sentence mining dilithium on Rura Penthe in 2152, he remarked to Captain Archer that he had perhaps spent too much time in the law library and not enough on the battlefield. (ENT: "Judgment")
In an alternate 2259, after John Harrison was reported to have bombed the Kelvin Memorial Archive, one of the officers present at the emergency meeting at Starfleet headquarters remarked that that was like bombing a library. (Star Trek Into Darkness)