Collecting and preserving written records goes back to ancient times, but the barbarians who sacked Rome in the 5th century destroyed a great many, so a lot of rare manuscripts have only been preserved indirectly, via the Arab world.
Various materials were used to write on: pieces of fabric, papyrus or vellum (fine animal leather). Parchment was expensive and was therefore used primarily for codices and deeds of privilege, due to its significantly longer lifespan. The most widely used material was paper. The writing implements used included the quill pen, engraver, brush or reed cane, charcoal and chalk sticks.
The transcription of books was the monks' domain. Each book was unique, carefully decorated, the text enriched with bounteous illuminations, all done by hand. The production of a book took many years, making them very expensive. Major works of that time came into being in Latin, but during the Middle Ages some literature began to appear in the respective national languages. Books were very heavy (so as to be hard to steal), and contained a great many pages. Although there were some miniature handbook formats, too, there were books so massive that they couldn't be carried by one man.
Not only because of thier value, but to protect them from destruction, important writings were often kept in chests or cabinets. Only later did 'libraries' come into being, where the volumes would be tethered to the reading desk by a chain.
Libraries were needed by administrative offices and places of learning, especially universities. The largest collections were to be found at the Sorbonne, Oxford and University of Prague, where there were books donated by Emperor Charles IV himself. Notable members of the nobility or the church also boasted private collections, despite the fact that not all of them could read.