We've all had the experience of reading a novel and being caught up not only in the story, but in the characters (think of Gone Girl and Catcher in the Rye). It's partly a matter of having an interest in one or another genre, but most of us have enjoyed novels that are not from our preferred reading landscape.
There are probably several reasons why a novel can grab and hold you so you're sorry the read is coming to an end.
First, there's the story itself. It resonates on some level. It taps into something deep within you -- perhaps the situation in which the protagonist is placed, or the twists and turns of the plot fire up your imagination and spur you on to the next page -- and the next. It may be the child's wish, residing in each of us, to know what happens next? Plot matters greatly and shouldn't be underestimated.
Equally important are the characters populating the novel. You want to care and feel for the protagonist. It matters what happens in his or her life. If he feels fear, you have that feeling. If she feels lust, so must you. If he's in a jam, you want to sweat along with him. If she feels devastated, you want to feel her anguish. In other words, you want to identify with the character and be inside his or her head and heart while the person negotiates the rigors of the plotline.
The novel must tap into some universal (yet personal) experience. It must reach out from the page and clutch onto some human commonality that exists for all of us. When a novel resonates deeply, it's usually because you can say I've felt that way... exactly that way. When that happens, the author has succeeded in capturing you into the world of his imagination.
Of course, there's language and dialogue. Dynamic language can describe so much while telling a story. It provides richness, and the scene comes alive. You can see, hear and even smell what's on the page.
When a writer's dialogue is crisp and real (think Elmore Leonard) you can actually hear the characters. An old saw has it that dialogue isn't just what people say to each other, it's what they do to each other with words. Each word spoken in a novel can connote action, or intention; and add to the story's narrative drive, it's arc... its essence.
People have preferences formed by their individual natures, backgrounds, and cultures. A good novel can transcend these differences and transport you to another world. It can make you live there and experience what that world is about (think of the Harry Potter novels, The Hunger Games or Game of Thrones).
Artfully written, a novel can make you leave behind your world -- at least for the hours you spend reading -- and enter the one unfolding on the pages before you.
Now that's magic.