The reason why most diets tend not to work for very long is because they are not sustainable. A person gains weight because he or she consumes more calories per day than needed. The diet creates a temporary deficit. When the diet ends, the person goes back to normal eating and the weight comes back.
Let's look at an example. Say that you weigh 150 pounds. That means that you burn 1,800 calories per day in a resting state. Let's also imagine that in the course of a day you burn 200 more calories living your life -- walking up and down steps, carrying in the groceries and so on. Your calorie needs then are, on average, 2,000 calories per day. Now let's further imagine that, on average, you consume 2,050 calories per day. On a daily basis your body is taking in, and therefore storing, 50 calories more than it needs. So every 70 days (3,500 calories in a pound / 50 calories each day = 70 days) you gain 1 pound (0.45 kg). If that "50 extra calories per day" trend continues, then over the course of a year you would gain 5 pounds. This, by the way, is the pattern for a big portion of the U.S. population. If you over-consume by just a few calories per day, over time you will gain weight. Keep in mind that just one Oreo-type cookie contains 50 calories, so over-consuming is incredibly easy.
One cookie contains 50 calories.
Now, you go on a diet -- the amazing "Get Slim Miracle Diet." On this diet, you consume nothing but 2 cups of brown rice and a can of Vienna sausages, along with all the onions you care to eat, every day. You start this diet and you are consuming only 1,000 calories per day. You also start jogging 2 miles a day. That means that, on a typical day, you are consuming 1,200 calories less than you need. Over the course of three days (3,500 calories in a pound / 1,200 calories each day = approximately 3 days), you will lose 1 pound of weight. You keep on this diet for two months and lose 20 pounds.
The day you go off this diet, what is going to happen? First, you are probably going to eat a lot more than normal because you have been eating nothing but rice and Vienna sausages for two months! Then you will settle into your "normal eating pattern" that you had before the diet. And eventually all of the weight comes back.
This is why diets don't work for most people. You do lose weight, but then go off the diet and gain it back. What is needed instead is a sustainable diet -- a food consumption and exercise plan -- that lets you live a normal life and eat normal foods in a normal way.