The original humans that migrated to Westeros some 12,000 years ago, the First Men, spoke their own language now called "the Old Tongue". They did not possess a writing system more advanced than runes for gravemarkers, so they made no written histories.
When the Andals invaded Westeros some 6,000 years ago, they imposed their culture and their language on their new domains. The language of the Andals is now known simply as "the Common Tongue," and in the modern day it is spoken throughout the overwhelming majority of Westeros. The Andals also introduced their writing system along with their language, so written histories do not date before the Andal invasion. It is also used extensively in areas of Essos that are in trade contact with Westeros such as the Free Cities, and also Slaver's Bay and Qarth. Even in the North of Westeros, where the First Men led by House Stark were able to repel the Andal invaders, over the centuries the Northmen adopted the Common Tongue of their Andal neighbors to the south. Certain place names and personal names used in the North derive from the Old Tongue and are thus notably distinct from names in the south, but the language is no longer used. The Old Tongue is only still actively used by the wildlings in the lands Beyond the Wall, though through trade contact and raiding, many wildlings also know the Common Tongue. Giants north of the Wall are said to speak the Old Tongue exclusively.
While the Rhoynar who migrated to Westeros a thousand years ago did possess their own language, they abandoned it in favor of the Common Tongue when they settled in Dorne and intermingled with the local population. Therefore, similar to the North, the modern-day Dornishmen may use place names and personal names that have a unique origin compared to other parts of Westeros dominated by the Andals, but they still speak the Common Tongue.
The non-human White Walkers of legend are said to have possessed their own language, which sounded like the crackling of ice, known as "Skroth". No human is known to have ever spoken it, nor have surviving examples of it ever been mentioned.
In contrast to Westeros, a diverse array of languages are spoken in Essos. The professional translator-slave Missandei in Slaver's Bay knows nineteen different languages, including the Common Tongue of Westeros.
Much of the continent was once dominated by the old Valyrian Freehold for thousands of years, stretching from what are now the Free Cities in the west, to Slaver's Bay in the east. The Valyrians forced the peoples they subjugated to speak in (or at least be able to converse in) their language, now known as "High Valyrian". After the Doom of Valyria 400 years ago, High Valyrian stopped being spoken as an everyday language, instead becoming a lore-language for learned men and scholars researching the knowledge of lost Valyria, even in Westeros.
Over the next four centuries, without the central influence of the Valyrian empire, the speech of their descendants and former colonies mutated into a new unique language group known as "Low Valyrian ", or "Bastard Valyrian". Low Valyrian is not one language, so much as a family of diverse dialects well on their way to becoming separate languages (so much so that even those who speak one might not be able to speak another, and without mutual intelligibility, it could be argued that they have truly become separate languages).
Each of the Nine Free Cities has its own dialect/language of Low Valyrian. These include Braavosi (Braavos), Lorathi (Lorath), Lysene (Lys), Myrish (Myr), Norvoshi (Norvos ), Pentoshi (Pentos), Qohorik (Qohor), Tyroshi (Tyrosh), and Volantene (Volantis). Slaver's Bay also has its own dialect/language of Low Valyrian, making for a total of ten different branches. The Low Valyrian of Slaver's Bay is somewhat influenced by the Old Ghiscari language of the fallen Ghiscari Empire, but owes more of its descent to High Valyrian than the old local languages.
See "Dothraki (language)"
The nomadic horsemen of the central plains of Essos, the Dothraki, possess their own unique language.
The Lhazareen have their own language, not derived from Valyria.
Qarth was never part of the Valyrian Freehold and possesses its own unique language (or languages). Because their own language is generally held to be very difficult for foreigners to pronounce, Qartheen often speak the Common Tongue to merchants and visitors from Westeros for the sake of convenience.
See "Asshai'i (language)"
In the books
George R.R. Martin has repeatedly stated that he is not a linguist, and thus never invented full languages for his fantasy world the way J.R.R. Tolkien did for his Middle-earth fantasy world (given that Tolkien was a professor of the Anglo-Saxon language at Oxford University and a master linguist). While some words and terms from the languages of Westeros and Essos are provided in the books, Martin never worked out anything resembling a full language.
The TV adaptation of the A Song of Ice and Fire novels was faced with the daunting task of writing for characters who speak in fictional languages which were never fully developed. According to Benioff and Weiss, they briefly tried just making up dialogue that sounded like Dothraki terms in the books, but quickly abandoned this when they realized that anyone listening to it could tell it was just made-up gibberish. Instead, they hired linguist David J. Peterson to construct artificial languages for the the TV series, starting with Dothraki in Season 1 as well as Valyrian starting in Season 3. While viewers might not be able to understand raw unsubtitled Dothraki, it still flows like an actual language with grammar and meaning.
By far the most important languages in the storyline are Dothraki and Valyrian, though Dothraki becomes less important after Daenerys leaves the Dothraki Sea in book/Season 1 (though apparently it will appear extensively again when Daenerys returns to Vaes Dothrak in the sixth novel). The Old Tongue is also somewhat important in the storyline of the Night's Watch as many of the wildlings speak it. The only languages not yet introduced in the TV series, which don't feature that prominently in the books either, are the languages of the Summer Islands, Lhazar, Qarth, and perhaps the language of Ibben. The language of the Inuit-like Ibbenese is described as "guttural and grunting", but otherwise no sampling has been provided (except for proper names). Similar to the TV series, Daenerys doesn't learn any Qartheen language(s) while staying in Qarth, but as a major mercantile center enough people there know either the Common Tongue or Valyrian that she doesn't need to. Little was revealed of Qarth's language other than proper names, no overall description was given of it, and it is doubtful that more will be revealed of it in the books or TV series now that Daenerys has left. Lhazar was briefly seen in Season 1 but nothing was mentioned of its language. Lhazar actually borders Slaver's Bay to the north, and thus trade-relations with Lhazar come back into Daenerys' storyline once she starts her campaign of conquest in Slaver's Bay, therefore there is some small chance that the TV series might have to develop it to an extent. The Lhazareen language is described in the books as having a singsong quality. Summer Islanders are prolific mariners and several characters encounter Summer Islander merchants or travelers in major port cities such as the Free Cities or King's Landing. After arriving in King's Landing, Margaery Tyrell and her handmaidens even have exiled prince Jalabhar Xho teach them the Summer Tongue as an intellectual pursuit.