The Afterlife in Harry Potter
WARNING: There be spoilers ahead! (Seriously big time spoilers)
Hogwarts is indeed haunted. Nearless Headless Nick, Moaning Myrtle, and other ghosts haunt the school's halls and, well, bathrooms. As in much modern popular fiction, though, not everyone becomes a ghost when they die, most just go on. Ghosts are those who linger and do not move on to whatever waits, as in The Sixth Sense or Medium. In interviews, Rowling has said this the result of the person fearing death.
The moving portraits are not really ghosts, or even living. Harry's visit by the departed in the Goblet of Fire is not a return from the dead either. The closest one comes to this is when Harry uses the resurrection stone near the end of the Deathly Hallows. But even the stone does not truly "resurrect" the loved one(s). It merely brings them to a point where the living can converse with them. Xenophilius Lovegood, in his description of the stone's effects when used by its original owner, says:
[T]he figure of the girl he had once hoped to marry, before her untimely death, appeared at once before him. Yet she was said and cold, separated from him as by a veil. Though she had returned to the mortal world, she did not truly belong there and suffered.
When Harry uses the stone, we are told that those who return to comfort him are "neither ghost nor truly flesh . . . Less substantial than living bodies, but much more than ghosts." In returning it is noted that Sirius is younger than when Harry knew him, apparently returned to the prime of his life.
The closest we get to the the actual afterlife in Harry Potter's universe is in the chapter "Kings Cross." There Harry has a final (presumably) conversation with Dumbledore. This is some kind of limbo, where Harry is given the choice to go on or to go back. In the book one could take this as all occurring in Harry's own mind, but interviews with Rowling indicate something "real" is happening. The figure on the floor is what remains of Voldemort and she calls it "a kind of limbo."
But Rowling does not touch on what the afterlife is like. Apparently the soul continues (otherwise, Harry could not call them back even partially) but little else is known. This is fairly typical in fiction. There are ghosts in Tolkien's works, and little is said about what happens when someone dies. Writers of fiction, with a few notable exceptions like Dante, have tended to avoid attempts at describing the afterlife. It is the great mystery that they cannot reveal. It is beyond a veil they dare not cross.
This stands out in the Harry Potter series in part because death and dealing with death is such a major theme. But as in real life, death is a wall that cannot be breached. Even in Bunyan's great Pilgrim's Progress, little is said about what life is like across the river.
But there is an affirmation of the afterlife. This occurs at Godric Hollow when Hermione tells Harry, regarding the inscription on his parents' grave ("The last enemy that shall be destroyed is death" - 1 Corinthians 15:26), "It means . . . you know . . . living beyond death. Living after death." Harry's parents, and those who knew them, have a hope beyond this life.
Whether it is like the hope of the Christian we are not told. For believers, there is not only life beyond this, but life where every tear is dried and joy ever blossoms. Those who have gone on before Harry seem to this settled peace. But even the Bible tells us that eye hath not seen and ear hath not heard what God has for us in heaven. Maybe, therefore, it is for the best that writers of fiction do not try to peer through the veil.