The Noldor that fled to Middle-earth following the Darkening of Valinor spoke Quenya among themselves. However when Thingol of Doriath, who was the king of the Sindar (silvan-Elves that stayed in Middle-earth all along) learnt about their slaying of the Teleri, he forbade the use of Quenya between his people and the Noldor, and forced them to communicate in Sindarin only.
The Quenya used in Middle-earth of the Third Age (the time of the setting of The Lord of the Rings) had come to be a scholarly-pursuit — something akin to Latin in our time. It was meant to be used as a formal language and for writing, and Sindarin was the vernacular of all Elves. However the Noldor still remembered it and valued it highly, which we can see in the way they treat Frodo's greeting elen síla lúmenn' omentielvo. ("A star shines on the hour of our meeting.") Noldorin (Exilic) Quenya differed somewhat from Valinorean Quenya, because even in exile the Noldorin Loremasters kept revising their language slightly.
Outside the fiction, its grammar is influenced by Finnish, being quite inflected. The phonology is also based on Finnish, and to a lesser extent Italian; namely, no consonant cluster can begin or end a syllable (with one exception, the dual dative ending -nt).
In our times, Quenya has a few publications of greater or lesser officiality, the more important being Vinyar Tengwar and Parma Eldalamberon.
Quenya is one of many Constructed languages introduced over the years by science fiction and fantasy writers, some others being Klingon, Newspeak, Nadsat and Lapine.
See also: Languages of Middle-earth, Sindarin, Tengwar