We will relate to a character in a novel or short story if that character has a problem. The problem is almost always the result of the character's motivation. He wants something--but he can't get it. That's the problem. If he didn't want something, whatever it is, then he wouldn't have a problem. We relate to people's problems because it is human nature to do so. It is something that has developed in humanity over millions of years. It has obvious evolutionary value. We have an instinct that makes us want to help people when they are in trouble. That is why there is so much trouble in novels, short stories, plays, and movies. Take a simple example: The movie The Wizard of Oz. Dorothy gets carried away by a toronado and wants to get back home to Kansas, but she doesn't know how to get there.
The other thing that makes us relate to a character is being in that character's point of view (POV). This can be done in the first person or in the third person. We will relate to a character if he has a problem and we remain in that character's POV. The character doesn't necessarily have to be a nice guy or a nice gal. We relate to David Copperfield because he has all kinds of problems--not only personal problems but other people's problems in which he becomes involved. Come to think of it, that was very sophisticated writing on Dickens' part--giving his hero problems that were other people's problems in addition to his own immediate personal problems.