You have periods as part of being able to have children. When you don't eat enough or exercise too much, your body says "hey, this is a lousy time for pregnancy - no food and harming the body with too much exercise", so your periods stop. What that means is if you get too thin or exercise too much, you will lose your period again.