Do Historians have to specialize in a field/one specific time period or can they just learn as much as they can about all different times and places?
Most of us who do it professionally are quite specialized in terms of research, although you're required to cover broader temporal/geographic areas during your graduate studies. Like, in my case, my main field for my Ph.D. was Modern Europe, and my minors were Holocaust/Genocide and Modern Middle East. However, in terms of actual publications, almost everything I've done is on Romania, either during or immediately after WWII. (Although I should note that I'm a museum historian and most of my "work" work has a broader geographic focus.)
It's nice to be widely read, but if it's your job to be an expert on something, it takes a lot of time to acquire the necessary language/research skills, read new publications in your field to stay abreast of the latest research, and do the research and writing for your own publications. It's like that in any field of academia, really.
It depends a little bit on your country of origin/study program. Traditionally, undergraduate studies will (and should) try to let you dip into every field, and then in the second half of your degree phase you will specialize in an era or area. Depending on where and what exactly you are studying, there will be different requirements (e.g. it is fairly pointless to study ancient history of Europe with professional intent without the ability to at least read Latin and some Greek; similarly, medieval history will push/require medieval Latin, and modern history -- this is all for European history of course -- will most likely require foreign languages (unless you're American and say, only wish to do specifically the modern UK, in which case English is the only requirement).
Having said that, it all really depends on where you study. For my undergraduate degree in European history (in Germany in this case) I needed Latin no matter what; and when I switched to a Ph.D. program in the United States later (and specialized in Modern European diplomatic/Transatlantic) there was a base requirement of reading ability for 3 modern European languages. It is possible these days to get away with less, but I honestly recommend putting some energy into languages, it will be an asset your whole life and massively broaden your horizon (and sources available).