That's kind of like a soliloquy! It's when a character in a story is all alone and talks to themselves. They might be thinking out loud, sharing their feelings, or making a big decision.
Sometimes in plays, actors will stand on stage and talk to themselves, just like you might talk to your toys! It's a way for the audience to hear what's going on inside the character's head.