It boils down to your natural ability to learn languages and how much time and effort you’re able to put toward it. I had about 5 years of French in school, but when I actually went there to live, that was barely adequate preparation. The first week, I had a headache every single day, from listening and thinking so freaking hard. It took about a month of living there and only speaking French and I was casually fluent. As in, a lot of words I still didn’t know, but I understood and could easily participate in daily conversations.
I have a natural gift for mimicry, which in turn, means a gift in languages. Also, with my 5 years of school study, it’s hard for me to say whether I’d have been in the same place after a month of immersion, without that background. Definitely after the 10–11 months of living there speaking only French, I was fluent. I also had gotten the accent down to where no one could guess my real country of origin.
Now, on the other hand, my mom moved to Italy about 15 years ago and I’ve been going there once every year or two. I usually spend at least 3 weeks when I go, but I speak English at home with the family and I don’t much study it when I’m in the US (though I should), so my learning is limited and definitely plateaued. For me to progress at this point, I have to really study it.
So, in my opinion/experience, it’s all about how easy or hard languages are for you and also whether you have the time to really study it and speak it.