Yeah I came here thinking it was about books. Apparently Magic people call their cards a library? Here I am sat with a plain old deck of cards like a complete lemon.
It's not your entire compendium in and out of game, it's simply the deck of cards from which you (usually) draw and is distinct from your hand, graveyard and banished cards.
Deck is the set of cards that you bring to a match.
Library is a region of the game state: the cards that are yet-to-be-drawn. This only exists as part of the gameplay. Other gamestate regions are the battlefield, the graveyard...