Author Anais Nin said, "The role of a writer is not to say what we all can say, but what we are unable to say."
William Wordsworth said, "Fill your paper with the breathings of your heart."
It's tough to put your heart down on the page, especially if you plan to let anyone read it. It takes courage to risk judgment and vulnerability, but it makes your characters and their motivations truly genuine. Whether it comes from your own personal experience or your experiences through people close to you, it's real, and that will make your story authentic.
This is not to say that one should reveal secrets and confidences, but rather to capture the emotional essence and channel it. I put a little of myself and those around me into each of my characters. It's scary, but it makes them beautiful and true.
When you find yourself thoroughly immersed in a book, it is very likely that you are experiencing the 'breathings' of the author's heart. Know it for the precious gift that it is.