In Order of the Phoenix, in chapter 34 "The Department of Mysteries" Harry and the group find themselves in the death chamber, Harry, Luna, Ginny and Neville are all entranced by the veil they find there but Ron and Hermione aren't.
JKR: Everyone wanted to go beyond the veil.
MA: This is very canon-based, but there are some things that as a fan, there are things I just gotta know. A lot of fans see the veil as that separation -
JKR: It's the divide between life and death. I tried to do a nod to that in the Tale of Three Brothers - she was separate from them as though through a veil. You can't go back if you pass through that veil, you cannot come back. Or you can't come back in any form that will make either person happy anyway.
But when they surround that veil [in Order of the Phoenix], I was trying to show that depending on their degree of skepticism or belief about what lay beyond - because Luna, of course, is a very spiritual character. Luna believes firmly in an afterlife. She's very clear on that. And she feels them speaking or hears them speaking much more clearly than Harry does. This is the idea of faith. Harry thinks he can hear them; he's drawn on. But Harry's had a life that has been so imbued with death that he now has an uncharacteristically strong curiosity about the afterlife, especially for a boy of 15, as he is in Phoenix. Ron's just scared, as I think Ron would be - he just knows this is something he doesn't want to dabble with. Hermione, hyper-rational Hermione - 'can't hear anything, get away from the Veil.' So if you walk through the veil, you're dead.You're dead. What you find on the other side, well, that's the question.
Do I believe you go on? Yes, I do believe you go on. I do believe in an afterlife, although I'm absolutely doubt-ridden and always have been but there you are.
I had not anticipated, though really I should have done, how interested people would be to go beyond the veil. And lots of people, including Dan [Radcliffe], wanted to go through the veil. But then that shouldn't surprise me because teenagers are very interested.
MA: Dan sort of does get to go beyond the veil.
JKR: Yeah, he does, but not literally through the veil.
MA: Not charging through. Ginny, Ginny can hear it because she's been...
JKR: I think women are more likely to hear than men. [Ginny and Harry] really are soulmates. I think she's like Harry. She's got an intellectual curiosity and she's got something of belief. Hermione [is] totally rational. "Let's all back away from the Veil and let's pretend we heard nothing."