J. R. R. Tolkien was a philologist, and he was interested in language since he was a child. He invented several languages, which he then used in his Middle-earth writings. Aside from the external history, most of his languages have also an invented "internal history". The internal history means how the languages evolved and were used inside the fictional story by the fictional people who spoke them. Some of Tolkien's languages have a detailed grammar and vocabulary. Other languages are not very detailed, and some languages have only a few words and names. Quenya and Sindarin are the best and most developed languages, while others like Rohirric, Khuzdûl, or Black Speech, are not as much developed.
Tolkien also created the Tengwar, Sarati, and Cirth scripts for his languages.
Languages of Middle-earth
The Elvish languages or Eldarin languages are the languages of the Elves. At other times, Elvish languages were the common speech. Later the Elvish languages were also used by humans, especially by scientists and the nobility. The Eldarin languages can be divided into two groups: Quenya language and Telerin languages (which includes Telerin, Nandorin, and Sindarin).
Quenya is an Elvish language. It was spoken by the Vanyar and Noldor elves in Valinor. When the Noldor returned to Middle-earth in the First Age, they brought Quenya with them. But the native Sindarin became far more common in everyday speech. In the Second Age and especially in the Third Age, Quenya in Middle-earth was used more as a scientific and ritual language. Because of this Tolkien sometimes called Quenya the "Elf-Latin".
Telerin is an Elvish language. It was spoken by the Teleri elves. From Telerin developed several new languages and dialects, for example Sindarin.
Sindarin is an Elvish language. It came from the Telerin language. It was spoken by the Sindar (or Grey Elves) in Middle-earth. It later became the most common elvish language spoken in Middle-earth.
Mannish (Human) languages
Adûnaic is the language of the people of Númenor. After the Fall of Númenor, Adûnaic was not often used anymore. From Adûnaic and the native languages of the western coastlands of Middle-earth developed Westron.
Westron (Westron: Adûni, Sindarin: Annúnaid), or the Common Speech (Westron: Sôval Phârë), is a language of Middle-earth. It comes from Adûnaic and the natives languages of Middle-earth. In the Third Age, Westron is used as the common language, spoken by most peoples. In the books, the text written in English is meant to be Westron most of the time.
Rohirric (also Rohirian or Rohanese) is the language of the Rohirrim of Rohan. In the books, Rohirric text and names are always represented by Old English. This is made because Rohirric should feel older but similar to the hobbit's Westron, and they are in the books represented by Old English and Modern English.
Khuzdûl is the language of the Dwarves. The dwarves keep much of what they do a secret, and they also do this with their language. Because of this, only a few place-names and phrases are known from Khuzdûl. Dwarves have never told other (non-dwarven) people their Khuzdûl names. Instead, they use other names when talking to the other peoples of Middle-earth. The dwarven "nicknames" that appear in the books are all taken from Norse mythology. Besides the spoken language, called aglab, Khuzdûl had the iglishmek, which was a sign language.
Entish is the language of the Ents. The language is, like the Ents themselves, very "unhasty": it takes a lot of time to say something. The language uses very long descriptions and many repetitions. Because it is so complicated and takes so much time, nobody but the Ents uses or can understand this language.
Valarin was the language spoken by the Ainur.
Black Speech is the language of Sauron. The language was created by him and used by his followers. The inscription on the One Ring was Black Speech, written in Tengwar. Aside from the Ring-inscription, there are several names and words of Black Speech known.
de:Sprachen und Schriften in Tolkiens Welt#Sprachen
Middle-earth languages Facts for Kids. Kiddle Encyclopedia.