Silent Hill 2 is a very isolated game. Although it is part of the larger story of the Silent Hill series, it stands mostly independently of all the other entries. Silent Hill 2 is simply James' story, as well as the brief glimpses he gets into the lives of others. And then Maria appears.

Family
Silent Hill 2: What is Pyramid Head?
Pyramid Head is one of the most iconic monsters in the series.
Maria is at the core of every emotion and experience James goes through in Silent Hill 2, but who she is as a person is never really explored, only hinted at. Silent Hill 2 Remake does not include it, but the Director's Cut of the original game includes a scenario that focuses only on Maria which makes her existence all the more complicated.
This article will contain spoilers for the entire original Silent Hill 2 and its additional scenario, Born From A Wish.
Where did Mary come from?
It's a question that's a little more straightforward than you might think. While the base game of Silent Hill 2 and its remake offer no explanation, the Born From A Wish scenario included in the Director's Cut of the original does. This is a short playable campaign with Maria as the sole protagonist.
aIt describes Maria's time in Silent Hill just before her meeting with James. Although not explicitly stated, it can be assumed that Born From A Wish is contemporaneous with the events of James' arrival in Silent Hill due to the short length of Maria's adventures before meeting him.
This leads to where she came from – Silent Hill. There are no other people in Silent Hill who actually seem to know the town except for Maria. Angela and Eddie are both looking for others, while Laura is just a kid running around aimlessly. However, Maria seems to have an intimate awareness of the city.
Silent Hill is a town with its own power, one that is never fully fleshed out. It clearly has the power to make your fear turn into something tangible, something we see for everyone else who has sinners before they are led to town. But for Maria? She sees what James sees, nothing more and nothing else. Based on this and the beginning of Born From A Wish there is a simple explanation.
Maria arrived the moment James entered Silent Hill. We never see her before, not even from her own perspective, but no one else in Silent Hill is actually from the town. The only explanation is that the city manifested her as a trial for James.
Is Maria a real person of her own?
This is where things get more complicated. From the moment James meets Maria, he sees his wife Mary in her. A remarkable resemblance by his own admission. This furthers the theory that Maria was born for James, but doesn't really answer any other questions, such as Born From A Wish poses.
Near the beginning of this scenario, Maria meets a man behind the door of the Baldwin Mansion named Ernest. This man, never seen, often mentions Jacob and his sin, and even points out that Mary is not a real individual, but merely a being created in Jacob's image of Mary. Maria is quick to reject this to assert her own individuality.
This means that for Maria, the circumstances surrounding her existence are not even known to her. She came into existence as a fully formed being, memories and all. Enough memories to make her believe she is a real person, not some amalgamation of others. Regardless of all this, Ernest asks Maria to help him find memories of his dead daughter.
This may be why Maria feels such a strong urge to help Laura, after Ernest's desire to remember her own daughter imprinted on her.
But after this conversation, Maria's manner changes. She becomes more like the Maria that James sees, despite having a more neutral manner before this. As you approach the end of Silent Hill 2 with the end of Leave or In Water, you meet Mary. Except this isn't Mary at all, but Mary designed to look like her. Accepting that James truly loves Mary, she puts on her image to tempt him further, but fails.
At this point, Mary is truly dead, James has passed his trial and accepted his sin. So is Maria her own person? In a sense, she was born without external influences. She was herself, even if she didn't know it herself. Yet her exposure to others, both James and Ernest, caused her to take on personality traits independent of herself. She came second. But she's not them, and she's not just a figment of James' imagination either. She is flesh and blood, even if she slowly becomes those around her.
How does Maria keep coming back to life?
Silent Hill is punishment for James, a way to test him to see if he can admit his own guilt for killing his wife Mary. Maria is another part of that test, a part of him focusing on his preferred version of Mary. One that is more fashionable, more sensual. One who is willing to please him and never drag him down. A Mary who will forgive him his selfish nature.
So Maria dies. She dies over and over because of James. All to tell James it's his fault. He killed his wife in the first place, and now his perfect version of Mary, Maria, is also dying because of her own punishment. And every time she comes back. She gives James a little more hope that she might be back for good this time.
She never died, she tells James when he finds her alive in the maze. Relax and spend some time with her, she knows he wants to. He is confused, but the allure is there. And then she dies again, this time from some cursed disease. Another flash of the real Mary in Mary.
Once again she returns, this time to be punished by Pyramid Head, James' very own judge, jury and executioner. He now understands why she has to die, what it means to him. It is atonement, a suffering he must endure to accept that he killed Maria, that he killed Maria and no one else. It was all his fault.
So how does Maria keep coming back? She appears to be a genuine human being, but she comes back unscathed from every death she suffers. Actually, it's the same way she got there in the first place. She was born from James' desire. And with his wish that she would grow with each death, Maria could come back the same person she was every time.
In the Maria ending, you meet James' memory of Mary at the end and kill her once and for all, letting the Maria that James grew to hate rest for good. Maria is the girl he really wanted. And at the end, he finds Maria safe and sound again, planning to leave Silent Hill with her in tow. Until she coughs, while he heartlessly tells her to watch it. He failed in the trial.
In the Maria ending, James finds Maria awake and unharmed in Heavens Night club. This is the same place where the Born From A Wish scenario begins.
Can Maria exist outside of Silent Hill?
Maria was born in Silent Hill, her existence is tied to James' punishment, and she is an extension of the environment. So is it even possible for her to physically leave Silent Hill? Although we never see it, the Maria ending of Silent Hill 2 seems to suggest that Maria may indeed leave. She is a physical person after all, not a figment of James's tortured mind.
But when we see her on the observation deck in Silent Hill getting ready to climb into James' car, she's coughing. James doesn't even look at her when he tells her to check it out. We could look at this purely metaphorically, that when Maria tries to become this perfect version of a dead woman, she has to suffer the same fate. She will also get the same cursed disease and die.
We could also look at it in the sense that since Maria is a creation of Silent Hill, she cannot physically leave it without her life being forfeited, her ability to live slowly drained from her. Of course, the end result is the same – Maria will die, and James will live in denial that it was his fault at all.

Next
Silent Hill 2 Review: Revisiting A Restless Dream
Is Silent Hill 2 still our special place, or has it become a twisted nightmare?