An eating disorder is a mental illness. However, unlike most mental illnesses they have a strong physical component and the effects of the eating disorder can have serious consequences on the body. Having a mental illness does not mean you will always have it, people can and do recover from eating disorders.
Bulimia nervosa is a severe, life-threatening disorder characterized by recurrent episodes of binge eating followed by self-induced vomiting or other purging methods (e.g., laxatives, diuretics, excessive exercise, fasting) to prevent weight gain.
Anorexia exists when a person severely cuts down the amount of food they eat. They might experience dramatic weight loss which can be life threatening, while still believing they need to lose more. They may also vomit (but not binge).