In CI school we were told it's important to go to a country where they speak the language we're trying to improve in order to work on the language. When you do this, what do you actually do in that country (that you can't do elsewhere)? For example, do you take classes and if so what types of classes?
I ask for active and passive languages.
EDIT: I do mean when one goes to a country for an extended period of time (thanks, Andy!).
Thanks much for your time and your help, everyone!
I think there are many things one does - so many that I know that I will miss some in this answer.
First of all, you learn about the culture. You might be taking classes that go beyond language learning (but that certainly add to one's knowledge of the language). When I spent a year in Madrid before starting my MA, I enrolled in a "Spanish Studies" course which included class on Spanish Literature, History, Geography, Philosophy, Art History, 20th Century Poetry, and of course the Spanish language.
But there are many others ways one learns about the culture and the language that goes with it: going to movies and plays, listening to music, hanging out in cafes or bars, traveling to various regions, reading newspapers, magazines and blogs, going to public lectures or political meetings or labor demonstrations, watching TV, going to museums of all kinds, etc.
When you are in the country of an acquired language you have more access to book stores and newsstands where you can browse. You have immediate visual access to everything and for someone like me who learns a lot through context and visual memory, that means a lot. Walking becomes a learning experience, as does shopping in neighborhood markets or even going for a hair cut (or perhaps these days to a tattoo parlor) or taking the train.
Now this may not be called "studying" but it is a central part of the idea of spending time in another country - and it contributes to the capacity to speak and comprehend.
As I read recently, one can be reborn in another language. That's the idea.
I don't disagree with anything Luigi says, but I'm going to take a slightly different angle on the same question. I'm assuming you mean for longer stays (for example to upgrade a C to a B) rather than 2 week top-up trips, but I may have got that wrong.
If you are an English native-speaker I think the most important point to start with is - avoid English speakers and people who want to speak English with you. Big cities and universities are not ideal as everyone either speaks English, wants to, or is English. Go to a small town. If you have almost any other mother tongue you should also avoid speaking it in the same way, but also pretend not to speak English. Insist on speaking the local language and be stubborn. In both cases you should have enough of the language for conversation BEFORE you go. If you don't, you'll end up speaking English when you can't say enough. (I hope this doesn't apply if you're already at CI school, but it might if you're adding another language.)
Live in shared accommodation with speakers of the language you're learning. Living alone means not talking/listening to the language when you are home. It's also very useful to watch TV with a local who can explain what you haven't understood. Particularly the cultural references, jokes and idioms.
Get a girl/boy-friend. It really does work.