If you are actually ill and need hospital care then the hospital cannot force you to leave but they can begin charging you.
Hospitals must treat you whether or not you have money or health insurance etc to cover the cost of the hospital stay and treatment.
The hospital will then discharge you from the hospital as soon as you're well enough to go home and when you're well enough to go home it's best to just leave the hospital to avoid being charged too much more money.
Now if you're causing problems in the hospital then the hospital can force you to leave the hospital through legal means such as having the guard escort you off the premises or having the police escort you off.
But if you need more treatment again then they must allow you back into the hospital for medical treatment.