@tintin,
imagine a hospital treats 20,000 patients per year. many of these patients have private health insurance. some patients do not have health insurance insurance.
The goverment require that those patients without health insurance are treated according to their need.
The hospital treats the patients without health insurance and sends an account to the government for that treatment.
so the doctors and nurses salaries and the hospitals operating costs are paid partly by the government and partly by the private patients who have health insurance.
However the government also says we will only pay a certain amount for each particular treatment (different amounts for different treatments of course) usually this amount is substantially less than what the hospital usually charges (in order to make a profit) so there is a lot less incentive for hospitals to treat the patients without health insurance. Sometimes the hospitals try to recover any shortfall in revenue recieved by billing the patients who do not have health insurance.
If the hospital makes a profit it will pay a dividend to its share holders.