Was the veil created by someone or was it always there in HP? What is its purpose? If one can't communicate with the dead through the veil, then what/how do unspeakables learn from the the veil? (except investigating how does it flutter,I suppose,,,,)
Was the veil created by someone or was it always there in HP?
The best I can find is this interview from 2005:
Melissa Anelli: Our third winner question is from Monique Padelis, who’s 15, of Surrey. How and when was the veil created?
JKR: The veil's been there as long as the Ministry of Magic has been there, and the Ministry of Magic has been there, not as long as Hogwarts, but a long time. We’re talking hundreds of years. It's not particularly important to know exactly when, but centuries, definitely.
So the veil is at least as old as the Ministry, but that doesn’t preclude the possibility that somebody else created it before the Ministry was established, or that it was created elsewhere and moved to the Ministry.
There’s nothing more specific that I can find.
The English phrase “beyond the veil” refers to the state beyond death. (The phrase in turn originates from a Hebrew phrase, describing the location of the Tabernacle in a Jewish temple, but I don’t know enough to take this further.)
The phrase is used in The Tale of the Three Brothers, when describing the Second Brother’s resurrected fiancée:
Yet she was silent and cold, separated from him as though by a veil.
The Tales tell of a historic figure who had prodigious magical ability. Whether this was Death, or just an exceptionally gifted person, doesn’t really matter. I think this is a likely candidate for the Veil’s creator.
What is its purpose?
From the same interview as above, we learn that its current purpose is only for study:
MA: Was it used as an execution chamber or just studying?
JKR: No, it's just studying. The Department of Mysteries is all about studying. They study the mind, the universe, death…
Again, this doesn’t address what it might have been used for pre-Ministry, or what its original creator’s purpose might have been.
If one can't communicate with the dead through the veil, then what do unspeakables learn from the the veil?
Presumably studying the nature of life and death. Being the Department of Mysteries, they tend not to be too forthcoming with the subjects of their research.
There’s also an interview from 2008 where she discusses the nature of the Veil a little further. If you follow the link, then there’s some more discussion of what the Veil means for each of the characters.
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 separated 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.
That doesn’t really answer any of your questions properly, but I don’t know of any canon sources that answer them directly. I’m afraid this is the best I can do.
Addendum: what/how do Unspeakables learn from the the veil?
There’s very little canon explaining what the Unspeakables do, or how they study. As the name suggests, their research is top secret. The one bit of canon I can find comes via Slytherincess from this question about the Love Room. In a 2008 Pottercast interview, JKR discussed what goes on in that room. (I’ve trimmed it for the points relevant here.)
SU: Well, we have a lot of questions still for you, Jo. Like stuff about that mysterious Department of Mysteries. Can you tell us what was in the Love room?
JKR: No, no, no, I think what’s in the Love room, it’s the place where they study what love means. So that room, I believe, would have at its center a kind of fountain or well containing a love potion, a very powerful love potion. […] So you would see wizards and witches taking it, they would study the effects.
This is similar to what Muggle scientists do: they form ideas about how the world works, then verify or refine them with experiments.
I can’t find anything about the Death Chamber in particular. I have some educated guesses, but I don’t want to clog up this answer with them. I’ve written up my speculation on my personal site, and you can read it there.