Hospitals cannot refuse treatment ba<x>sed upon inability to pay, but this doesn't apply to things like a heart transplant which would be incredibly expensive. For that they would have to rely on charity or raise funds somehow.
There are places like St. Jude's Children's Hospital that specialize in children's cancers and such, and are funded entirely by donations. I don't know how hard it is to get in, though. And there are certain conditions that make you qualify for government programs like MedicAid and SSI that will help.