A library is a place where information, usually in book or computer form, is stored and accessible to others. Usually the books are grouped by genre (fiction, non-fiction, history, etc.) and then sorted alphabetically by the author's last name. Librarians work in libraries to assist those with information needs. Also, many larger starships designed for long-range missions were equipped with libraries.
Federation starships were equipped standard with a library containing complete copies and discussion of more significant pieces of fiction from multiple species, including novels, scripts, poetry, holoprograms, two-dimensional films, and several games. In 2371 Tuvok traded a copy of the library aboard USS Voyager to Jaret Otel in exchange for the Sikarians' spatial trajector technology. (VOY: "Prime Factors"; The Mysterious Case of Neelix's Lungs: "Factoring Primes")