When you inhabit a place, you live there. When actors inhabit their roles, they seem to become the characters, no longer actors reciting their lines. It is like they live the life of the character.
The verb inhabit comes from the Old French enhabiter, meaning “dwell in.” You can inhabit an actual place, like a home, a cave, or a neighborhood. You can also inhabit an imaginary world, like those who choose to inhabit cyberspace with a made-up persona, telling about experiences that are nothing like the person's real life. Actors who truly inhabit their roles sometimes struggle to return to reality after a movie or television show wraps.