One of most important factors in determining the value of a book is its condition. So, throughout the years, as you collect books and add to your personal library, it's a good idea to treat them well -- even books you couldn't care less about. In fact, you should treat them well especially if they're books you don't care about. These are exactly the ones you're more likely to sell down the road.
Books keep best in cool, dry rooms. Humidity is conducive to mold and mildew, which can ruin books permanently. Long exposure to light can also fade books, so low or indirect lighting is best when they aren't in use. Definitely avoid storing them in direct sunlight. Although many people tend to keep old books out of the way in basements, attics or even garages, these are often the worst places for book storage, because they tend to be damp, hot or generally unstable.
Ideally, store books upright on shelves. If you own large books like atlases, place them flat so they're fully supported. If you have to pack them in boxes, pack them tightly so they don't rub against each other, and lay them on top of each other so they're supported firmly [source: Wuorio].