I really didn't understand the ending of the movie "The House on Pine Street". I don't even know whether there really were supernatural events happening or it was all on her mind. Can someone explain?
This Director/Writer interview would seem to answer your questions
Was it all in her mind?
No. It's a haunted house. It's not in her mind, genuinely supernatural things are happening.
Why is the ghost there?
The Directors intentionally left the ending (and indeed the whole reasoning behind the ghost being stuck in the house) intentionally vague as a way of fighting back against what they see as an annoying tendency in modern ghost-horror films to overexplain why there are ghosts and how to get rid of them.
No, the house isn't haunted. The movie ends when the "energies" that have been at odds with the main charactar's "energy" offed her husband as a final way to get her to leave it in peace. The house is shown at the end for what it truly is, just an old house, no ghosts.