The reason someone with an eating disorder is admitted to hospital is because they are medically at risk and they need hospital treatment to make sure they are physically safe.
There are two things that happen with an eating disorder. One is the mental health side of the problem, called the emotional or psychological side, and one is the physical or medical side of the illness.
If you are coping on a day to day basis it could be that you are being seen by a team of people from Child and Adolescent Mental Health Services (CAMHS) as an outpatient.
One would hope that your GP or a Practice Nurse is monitoring your physical wellbeing and making sure your weight does not drop too low.
You can be kept in hospital until it is decided you are medically stable enough to go home.
Discharge might be done under the supervision of your GP. If you are not supervised by your GP then it needs too, the last thing you want is to be re-admitted.