In The Seven Sins of Memory (paperback, Kindle), psychologist Daniel Schachter attempts to characterize the failure modes of human memory. Schachter enumerates seven "sins" of memory: transience, absent-mindedness, blocking, misattribution, suggestibility, bias, and persistence. At a high level, these failures include not being able to recall things when desired, recalling things when not desired, and recalling things incorrectly.
I suppose most of us are keenly aware of the first and second categories of memory errors, because at the time we experience any such failure it is very obvious that such a thing has happened. The last category, recalling things incorrectly, represents the "silent failure" mode of memory, and is rather more pernicious (and less well understood). The sin of bias, for example, reflects the fact that recalling is an active process. One manifestation of bias is that recollections of the past are suspiciously similar to conditions in the present. For example, "[people] whose views on political issues have changed over time often recall incorrectly past attitudes as highly similar to present ones." Another sin, suggestibility, has major consequences for how we should interpret the testimony of witnesses in court.
Schachter explains in detail each sin, and mentions relevant literature that sheds light on the specifics of each failure mode. Frequently, understanding these specifics suggests useful tips and techniques that can be used to counteract or "work around" the failure. (The tips are also simple— very little is said of memory palaces, Mega Memory, and other very tiring techniques.) These days, the portable electronic devices we carry around are also useful tools for augmenting our memories.
In the last part of the book Schachter speculates on why memory evolved this way.
For example, forgetting the details of events gradually over time (transience of memory) is clearly economical, since we have a greater need for recalling things in the immediate past. So it appears that the brain initially encodes detailed records in memory ("We started the morning with continental breakfast at the hotel...") but gradually replaces the detailed record with the gist of what happened ("I had a great time"). When you are trying to recall an event from long ago, you use the gist of the memory and other techniques (inference, your knowledge of what usually happens under similar circumstances, a wild-ass guess, etc.) to reconstruct the event rather than recalling it directly. The brain uses lossy compression, and for events further in the past it dials up the lossiness! Some sins, like transience, appear to be evolutionary adaptations (i.e. actually useful behaviors), but others are the byproducts of evolutionary design trade-offs. All told, memory is not a poorly implemented and unreliable hack, but rather a pretty decent system given the hardware constraints.
This book is ostensibly about memory but, memory being such an integral part of our awareness, there is also plenty about attention, learning, and cognitive biases. This book is chock-full of useful information about one's mind and how to use it just a bit more effectively. Recommended.