Hungary is a country located in Europe. But Hungarian is, in fact, not a European language.
Most languages in Europe belong to the Indo-European language family. These languages are a large family that Germanic (English, German), Romance (French, Spanish), Slavic (Russian, Polish) and other languages belong to.
Hungarian belongs to a different language family: it is a Uralic language. The Uralic languages form a family of languages spoken predominantly in Northern Eurasia. The Uralic languages with the most native speakers are Hungarian, Finnish, and Estonian.
Other Uralic languages with significant numbers of speakers are Erzya, Moksha, Mari, Udmurt, and Komi, which are officially recognized languages in various regions of Russia.
The name “Uralic” derives from the fact that the family’s original homeland is commonly hypothesized to lie in the vicinity of the Ural Mountains. Finno-Ugric is sometimes used as a synonym for Uralic.
So, how come a Uralic people live among Indo-Europeans far from their historic motherland? The simple answer is migration.
Around 3rd or 4th millennia B.C., Uralic people started to separate. Some moved to the west, creating the Finno-Ugric family. From there, some (Finns, Estonians) moved northwest creating the Finn Permic and Hungarians and others to the south creating the Ugric branch, eventually settling where the countries of Finnland, Estonia, and Hungary are located now.
As with all related languages, Uralic languages share some similarities, but not enough to be mutually intelligible to any significant degree.
Uralic languages share a basic vocabulary of about 200 words, including body parts, kinship terms, names of animals, natural objects (e.g., stone, water, tree), common verbs, basic pronouns, and numerals. The rest of the vocabulary consists of borrowings from other languages. The sources of borrowing vary from language to language. Languages spoken on the territory of Russia tend to have Russified vocabularies.
Uralic languages also share some similarities in pronunciation (vowel harmony is present in most) and grammar (a large number of noun cases and other inflections).
Although a classical classification of Uralic languages has existed since the 19th century, there is no consensus and there are scholars who propose different classifications.
Some scholars even see ties between Uralic languages and other groups, like Altaic or Eskimo-Aleut languages, or even the Basque language. However, none of these hypotheses are generally accepted by linguists at the present time.