I watched this movie in French, but it was obviously in a very American suburban setting. A shy little boy has no friends to play with and is even afraid to ride his bicycle. His only pleasure is reading, so he spends all his free time in the public library.
One day, someone (maybe the librarian, or just some other adult in the library, I don't remember) starts a conversation with him. He advises the boy to read a specific book. All this happens in the real world, with actors.
The boy starts to read the book and "falls into" a fantastic world, which is an animation, though IIRC, he is represented as a real person, not as an animated alias. There are lots of things that happen there which I totally forgot.
The only other thing that I remember is that when he "emerges" back into the "real world", his virtual experiences have made him more "adventurous". At least, he is not afraid anymore to ride his bicycle...