I've learned a lot the past couple years on the correct way to lose weight, mostly from trial and error. I was like many others out there, and struggled to try and lose weight but not succeed.
Finally I realized... you have to eat properly too, not just exercise. Before I lost the weight, I would exercise two to three times a week but did nothing to change my diet. When I think about how bad my diet was back then, I wonder how I could eat all that I did. I mean a good majority of the food I ate had a ton of sugar in them. I'm talking about candy bars, ice cream, frozen dinners, cookies, the list goes on and on!
If you're struggling with losing weight, take a look at all you are eating. I think the online food journals are a valuable tool. You really get a good idea on how to eat better when you see the number of calories you're eating. It's hard to break bad food habits, but if you stick to using the food journals, it gets easier. If you're overloading on sugar, you'll see it in the food journals.
The biggest mistake people make in their diets is drinking your calories. Regular soda is the biggest waste of calories and way too much sugar. Diet soda is not a better option as it contains so many chemicals and some people believe it can actually lead to weight gain. Giving up soda is one of the best things I did for my diet. My teeth and gums are so much healthier!
You don't have to give up sugar completely, but at least be conscious of it. You'd be surprised how many items are loaded with sugar... even condiments like ketchup. Everyone has cheat days and don't beat yourself up about it. The thing is, you should aim to have most of your calories each day from fruits, vegetables, nuts and other healthier options.