Between my med school and those I'm familiar with via friends, etc. flunking out of med school is pretty rare. Maybe there are a few schools that are exceptions, but that hasn't been my experience. Yes, people struggle; those who have a hard time passing are 'helped along' by the administration---given tutors, academic advisors, etc.--in order to prevent attrition within the class.
That being said, those who are having extreme difficulties are allowed to drop *some* classes and take them the following year (hence join the following class & taking a lighter class load) or take a leave of absence (drop all classes) until the following year (still ultimately joining the next class).
At my school, I haven't heard of anybody actually flunking out. Some people realize medicine isn't for them (irrespective of grades) and voluntarily leave (rumor was that a med4 dropped out halfway thru the last year!) and others are kicked out for other reasons (misconduct and the like)...but I haven't heard of anybody who wanted to stay in med school who was booted for failing too many classes. Bottomline: the majority of med schools want to keep you there---it makes them & their teaching methods look bad if students are failing out. Afterall, who wants to attend a school that is known for having an unusually high dropout rate? 😕