You need to give the player something to relate to. Once they can relate to the game they start thinking of the characters as real, living creatures instead of little pixels on the screen. The player will start to sympathize with the character, maybe think about “Hey what if this happened to me?”. This gives them more of an in depth experience. Also, characters should not be linear in the least, and need to be as unique and dynamic as possible, changing throughout the game.
Take, for example, Thomas Was Alone. You’re playing with simple rectangles, but you hear their thoughts. The angry little red one (red, right? Or was it orange?), the somewhat confused but excited main characte, as well as all the others. The characters create opinions of each other and it changes over the course of the gameplay. This really sucks a player in.
When I played Bioshock:Infinite I got completely enveloped into the game. I wasn’t just the player on the other side of the screen; I was Booker. I cared for Elizabeth, and once the game ended I was actually sad that I wouldn’t be able to play more and interact with the world.