It is a question as old as time, or at least since Twinkies were invented. The answer has also be the same since the beginning. Diet and exercise. Now the word, "diet" is scary to many people. It suggest that you must starve yourself to lose weight but in actuality you are simply alternating and adjusting the way you currently eat. It just depends on how soon you wish to reach your targeted weight, on whether you adhere to a strict meal plan or not.
Exercise, although it plays second fiddle to diet, is still extremely important to losing weight. With weight gains comes the slowing of ones metabolism and the changing of muscle to fat. Two key things that exercising, more so with resistance training, does is to speed up your metabolism and turn fat into muscle. Your metabolism burns off your food when you are not exercising. A increased rate can allow you to lose more weight when you body is at rest. Turning fat into muscle, in a simple explanation, helps you to appear leaner. As muscle is more dense than fat, it takes up less volume in your body.