The Yo-Yo Dieting Effect
Ever heard of a negative energy balance? That's what diets do to you -- they lower your caloric intake below the basal metabolic rate which creates a negative energy balance. You will lose weight, but it will be a muscle loss.
Food gives you energy. When you have less energy than is required, your body think its starving and burns muscle to fuel its energy requirements. In doing so, it actually slows down its metabolism (the rate at which you are burning calories).
When going through a process of starvation, the body will store whatever it can as body-fat to protect itself. It will also respond to a threat of starvation by increasing the fat-depositing enzymes which in turn store more fat.
So why do you gain weight after you've lost it?
By lowering the metabolism, your body requires fewer calories. When you go off a diet, your body craves all it was missing and your calorie consumption increases and you gain back more fat than lean muscle mass. Even if you eat the same amount of calories as you did before the diet, you will not maintain your weight, because you've lost your lean muscle mass.
In fact, because your caloric needs decrease, you will end up gaining weight! This explains the yo-yo dieting effect.