"Anyone can speak Troll. All you have to do is point and grunt."
-- Fred Weasley
Judging by the fact that Barty Crouch Sr. speaks over 200 languages, both Muggle and Magical, it seems likely that there are magical ways for wizards to learn them.
Since Hogwarts is located in an English-speaking country, everyone there speaks that language. A number of dialects are evident, however, particularly from Hagrid, whose dialect comes from the region of the Forest of Dean:
"Living in this really rural area [The Forest of Dean], where there was very little to do -- beautiful wild scenery and so on -- I think it really stimulated my imagination, definitely, just because we couldn't go to the cinema, we couldn't do what a lot of urban kids do, so we were out making up ridiculous things in the fields."
Though the setting was an influence on her work, only one character in the books is directly drawn from the Forest of Dean: Hagrid, the enormous Keeper of the Keys, whose dropped word-endings are a Chepstow speciality. In shape he's modelled on the Welsh chapter of Hells Angels who'd swoop down on the town and hog the bar, "huge mountains of leather and hair." (Goring, Rosemary. "Harry's Fame," Scotland on Sunday, 17 January 1999).
Seamus Finnigan speaks with an Irish brogue. Fleur Delacour's English is heavily accented from French ("eez" for "is, etc.).
The Bulgarian Minister of Magic, Mr. Oblansk, acted as though he couldn't speak English, only Bulgarian, letting Fudge stumble through the entire day of the Quidditch World Cup trying to make himself understood. After the match was over and Ireland won, Mr. Oblansk said, in perfectly good English, "Well, we fought bravely." Fudge was a little put out (GF8).
The students from Beauxbatons Academy spoke French. They managed English very well, however. One wonders how well students from Hogwarts would have fared had they been transported to Beauxbatons; there is no evidence of instruction in foreign languages at Hogwarts.
many other languages
Harry heard folks talking excitedly in other languages as they walked through the campground at the Quidditch World Cup (GF7)
the root language of many of the spell words
I enjoy feeling that wizards would continue to use this
dead language in their everyday life."
-- J. K. Rowling (Sch2)
"It just amused me, the idea that wizards would still be using Latin
as a living language, although it is, as scholars of Latin will know ...
I take great liberties with the language for spells. I see it as a kind
of mutation that the wizards are using."
-- J.K. Rowling (CBC)
Fairies use what sounds like a form of buzzing to communicate among themselves (FB). Note that it is quite possible that fairies, like bats, have hearing that can pick up higher-pitched sounds than most humans can hear, so there may be more to fairy communication than the casual listener would notice.
The giants speak their own language; some do not speak English, and possibly do not speak any human language. However, enough surviving giants speak English that a translator can be found if the giants care to permit a visitor to communicate (OP20).
The goblin language. "Bladvak" means "axe" in Gobbledegook (GF24) Harry, Ron, and Hermione hear Goblins conversing in their native language; it struck them as being "a rough and unmelodious tongue, a string of rattling, guttural noises..." (DH15). Miranda Goshawk's original The Book of Spells was translated into Gobbledegook (BoS).
Merfolk language used above water (FB, DH8);
speak human languages underwater. It sounds like horrible screeching
if heard in air.
Dumbledore can speak Mermish (GF26, HBP30). Miranda Goshawk's original The Book of Spells was translated into Mermish (BoS).
Parseltongue is the language of snakes.
The Trolls' crude form of language consists of grunts (from the viewpoint of a human listener, at any rate), although some can be trained to speak a few words of English (FB).