Basically what happens is after the hospital has determined that the patient doesn't have a medical or psychiatric emergency (doesn't mean the patient doesn't have a medical or psychiatric condition, just not an emergent one right then), the Hospital no longer has an EMTALA duty to care for the patient. This cannot be determined until the patient has had an MSE done by someone qualified to perform the MSE. (This is very important, BTW.) Since the Hospital no longer is required by EMTALA to treat the patient, the Hospital ED can discharge the patient. At that time the patient is considered to be just like any other person and the Hospital does not have to allow the person to remain on Hospital grounds. If the person refuses to leave, that person can be arrested/charged with trespassing. Here's the wrinkle: person comes back to the ED claiming to have a medical or psychiatric emergency, the Hospital then is required by EMTALA to perform another MSE. If no emergent condition is found, the cycle continues. If the person does this enough times, the Hospital may attempt to have a restraining order placed and violation of said order results in arrest. In that instance, the person had better truly have a medical or psychiatric emergency if they present themselves to the ED or they'll be in violation of the restraining order. If that happens and the patient is stabilized and can be discharged, the person must leave immediately or be subject to the RO.
Here's an interesting twist as well: if someone keeps returning to the ED, the Hospital may try to have that person arrested/charged with (basically) abuse of the emergency system.
In short, read up on EMTALA. It's a very big hammer that Hospitals do NOT want to get hit with and it's easy to violate this law. EMTALA does have its limits and that is once the patient's emergency condition is stabilized, EMTALA no longer applies. Under EMTALA, the Hospital doesn't have to treat or stabilize all of the patient's conditions, only their emergent ones. Patients often don't understand this...