A library is basically the nexus of the universe. It's where ordinary citizens can go and be transformed into Time Lords; see what happened, what's happening, what could happen. See every dream and every nightmare ever pulled from the minds of mere mortals.
Just pull a portal off a shelf and go to Hogwarts, Narnia, or Middle Earth; go to 1922, 1590, or 3306. Go watch Hitler commit crimes against humanity, watch Monet create a masterpiece, or visit with your favorite Intergalactic Queen... What ever adventure you desire can be located at a library... Unless it's in your head, then you need to write it down and add it to a library.
Some libraries can be quite beautiful, like this one in Austria's Melk Abbey.
Some can be very large, like Trinity College Library in Ireland.
Or oddly shaped like Stockholm Public Library.
Some can be built for comfort and accessibility like Prague Public Library, Oklahoma.
What libraries, big and small, all have in common: You go there, to go elsewhere.
*Please note: I am not responsible for your failure to portal jump.*