Many of the answers can be found in your local library.
All libraries use a system for keeping track of their books.
The call numbers are formulated from tables dividing all of human knowledge in subject areas. That is why you will find books on the same topic next to each other on the shelves. The two most common classification systems are the Dewey Decimal and Library of Congress. Dewey Decimal is typically used in public and school libraries. LC is widely used in college and university libraries.