Technically they are free. You are volunteering your time. Most programs pay for room/board and give you a small stipend based on local living expenses. They also pay for your airfare to get to wherever they are sending you. Some programs (not all) pay for some of your training courses.
To the OP, if you do a seach of DWB/MSF you will find many, many posts/threads. Although, there are tons of other orgs out there as well. My DH and I just considered applying to one (that takes residents) but the minimum time commitment was 1-2 years.