They didn't become related. The common roots of the 3 languages (with only about 200 related words) originated just west of the Ural Mountains and grew further and further apart with time. The first mention of any Uralic language was in 98 AD in Tacitus's "Germania." The languages are very distantly related.
When linguists say that languages are "related" or belong to the same "language family" they're actually making a very specific claim: that the languages are all descended from a single older language that existed in the past. An example of this that might be more familiar to you is the family of Romance languages: Spanish, French, Italian, Portugese, and others are all descended from Latin.
These languages share certain similarities because of their common descent, but the reason they belong to the family of Romance languages is not because they're similar, but instead because they all originated as dialects of Latin. What were initially smaller regional differences in pronunciation, grammar, and vocabulary became bigger over time, until eventually they came to be regarded as separate languages.
EDIT: To address the question more specifically: The history of the Uralic languages is pretty unclear, because written records only go back so far. The ancestor language (Proto-Uralic) is only known from linguistic reconstruction -- that is, by analyzing the existing languages in the family, we can infer that the ancestor language had certain properties. But it was never written down, and the relative dominance of Slavic cultures in the East and Germanic cultures in the West obscure the issue further. We can't even say with much precision in exactly what region of Europe Proto-Uralic was spoken, but it is often regarded to be in the vicinity of the Ural Mountains, which is why the family is so named.
For thousands of years Siberia and large parts of Russia where inhabited by the Finno-Ugrics (ancestors of the Fins and hungarians). Because the rise of the Russians and their Slavic culture, the Finno-Ugrics just started to dissapear. People started to speak slavic languages because they became more important in the new Slavic states (like Russia) and were also alot easier to learn (for example the crazy grammar rules of Finnish). Hungary, Finland and Estonia are just the last remaining parts of the original culture.