I've had a few players who were entirely new to role playing and had this come up. For some people, it just takes a while for them to get comfortable with the game. D&D can be a little complex at times, especially if you're new to gaming. So it make take some time for them to wrap their heads around the rules before feeling comfortable role playing. Once they get more comfortable with their character and see the rest of the group having fun playing their characters, they start to come around. Though to help out, I have some things I do to encourage them to role play and engage the character.
I start with character creation. I have a list of questions that every player gets when creating a character. It tops out at 5 questions at most and I have a few I rotate depending on the game. I don't ask anything about race, class or skills. Rather I ask them about who their character is as a person. I ask them to list a few personality traits, good or bad. I ask them for something they carry around that has sentimental value. I ask who their best friend is or about their family. Things like that. It encourages them to be more creative with their backgrounds and think about their character beyond class and stats. More importantly, it gives them a little slice of the game world that they create. They've just created a few NPCs that exist in the world for the sole purpose of engaging them. They're more likely to care about these NPCs as they created them. Anytime you want to engage the player or add some tension or drama, one of these NPCs shows up. Now you're engaging them. One of my favorite off the wall questions is "what is a quirk or habit your character has?". It can be anything from absentmindedly whistling when bored to some kind of ADD. I played a character who tapped his fingers when bored or frustrated. When I started tapping my fingers, people noticed and knew what it meant. It got me into trouble sometimes too. It just added a layer to the character that wasn't there before and made them more believable.
As a DM, I also find things about their character to engage them. Is the player playing a ranger? Perhaps he meets some hunters out in the wild who invite him to join their lodge. Maybe the wizard gets an exclusive invitation to the great library of a rare book collector. The paladin discovers corruption in his order. Perhaps a well established order wants the paladin or fighter to join their ranks. Maybe the fighter's old war buddy shows up with a problem and needs help. Or take some pages from history, like the Monk's temple is seized by the government when martial arts are outlawed.
When a player builds a character, they're telling you what they want and what interests them. They're even telling you how they want you to mess with them. Do they have an elderly family member they send money to for healing potions and rare herbs? They are telling you they want that family drama and risk to be a part of their character's heroic journey and character arc. Look at what they play and find unique ways to engage them. That puts them in the spotlight and gives them time to shine. They play the hero and can make a real difference while role playing with the toys they gave you. They've done most of the work, just give them what they want and they'll engage it.