The short answer is, take in fewer calories than you burn, and you will lose weight. Take in more calories than you burn, you will gain.
But the question is, how do you do this? Your best bet is to do things the natural way. Cut back 10% on the eating and increase by 10% the activity, and see if you see a difference on the scale in a week, two weeks or three weeks. Then try a larger percent. But make it your goal only to loose a pound or two per week (maybe 5 per week for a big guy, for a while. But not forever.)
One way to intake less is to fast, but read up on fasting and the health question. Some people can do an intermittent fast and get results, but it is borderline faddish. This is because it is not something most people can maintain, and a lot of times people eat more in between fasts. The goal is to get your stomach used to slightly smaller portions, and to get your body used to slightly more activity. This doesn't happen with fasting.
I've been intermittent fasting for years and love it. I like to fast leangains (16 hour fast/8 hour eating window). I combine this with low carb/sugar. I had severe insulin resistance with chronically high insulin so I found out the hard way you are not burning fat in a high insulin state!!! My reason for insulin resistance was sugar! Anything that improves insulin sensitivity is a good thing! Intermittent fasting is one of the ways to improve insulin sensitivity. Other ways to improve insulin sensitivity include avoid/limit processed sugar and refined carbs, exercise - particularly weight training, magnesium, good night's sleep to name a few.
Intermittent fasting probably isn't going to solve your weight problem. People who do it usually do it for detoxification reasons, some for spiritual reasons. Those who do it for weight loss probably get mixed results, but it doesn't solve the primary problem, which the first answer responded to well -- you have to change your diet permanently to one that is better and increase your energy output permanently as well. Slow weight loss stays off, quick weight loss usually doesn't. Fads usually don't last in the results -- they might work well in the beginning, but not for the long-term. By your own explanation, your problem is known -- you changed to an unhealthy lifestyle. Change back to a healthy one and time should take care of it because it was taking care of it when you were doing that.
I did not mean the kind of food sold under the Weight Watchers brand, I meant, go to the meetings and learn what they teach about nutrition and talk with the other people who are there. It really helps to have company in your journey.