Liber is used when it is the thing doing the action (the nominative singular case).
Librum is used in most cases as the thing the action is being done to (the accusative singular case).
Liber legit -> 'A book reads'. compared to Librum legit -> 'He/she reads a book'.
Liber legis -> 'You, a book, read'. (Specifying you are a book, not what is read) compared to Librum legis -> 'You read a book'.