It depends on which 'girl in the closet' story you are referring to. There are likely many stories with this title or similar themes. Some are based on true events that are heart - breaking. For example, there could be a situation where a child is locked in a closet as a form of punishment or due to mental illness of the caregiver. But there are also fictional tales that use this concept for dramatic effect. So, without more specific information, it's hard to say for sure if a particular 'girl in the closet' story is true.
We don't have enough information from just the title to identify the girl. She could be a young girl from a small town who got into a strange situation in the closet. Or she could be a girl from a big city facing some sort of domestic issue that led her to be in the closet. There are countless possibilities until we actually read the story.