Of course, they don't just magically pour the language into your brain. You still have to put in the effort to learn. You just have no out of pocket cost.
But, how can they afford to just give it away? No, they don't plaster the site with advertisements to generate income. They actually benefit from the things you do as you complete the courses.
How do they benefit, you ask? As hard as it is to believe, as you take the course, you are actually helping them translate internet web pages into the language you are learning.
So you win by learning a language for free. They win by getting free labor to do the translations they are interested in.
Check them out at duoLingo.com.