Generally, even a little exercise is better than none. Even if it doesn't make you lose weight, it is still good for you, and if it's something you enjoy and can make part of your daily routine, you're more likely to keep it up.
Whether a particular form of exercise is a good idea depends upon who is doing it. I avoid running because running is high-impact exercise, and I've had joint problems my whole life. When I was in grad school, I tried running up the 10 flights of stairs to my office every day, and after a week or so of that, I developed knee problems to the point that I could barely walk. Since I was living and studying in NYC at the time, not walking was not a possibility. I now avoid running and I use elevators rather than stairs whenever possible.
Nowadays, my regular daily exercise is bicycling. I have a few routes that mostly avoid the traffic and I ride at 6:00 a.m. when traffic is pretty light anyway. My usual routes are a mile or so, but I try to bike across the Hudson and back at least once a week, which amounts to 8 miles round trip. I also walk into town every day, which is a 1 mile round trip.
As for losing weight: there is no one-size-fits-all. Simply trying to eat less usually doesn't work (if you were able to do that, you would already have done it.) And there are many different reasons for being overweight, and each requires a different approach. Unfortunately, most doctors treat obesity as a moral problem rather than a medical problem (probably because most doctors don't want to deal with problems that don't have an obvious solution), and so are pretty useless. I was fortunate that my endocrinologist has been working with me, and the medical practice also had a nutritionist on staff.
However, what finally helped me lose weight was retiring. My problem is stress eating, and my job was stressful (bad upper management putting us in no-win situations) and getting worse. My weight started going down almost from the day I quit work, and I lost around 30 lbs in six months.
Again, this is what worked for me. It wouldn't work for someone who loses their appetite under stress, for instance.
There can also be psychological issues. Dr. Bessel van der Kolk, in <em>the Body Keeps the Score</em> reports on one doctors experience with patients whose obesity is due to psychological trauma, e.g., childhood sexual abuse. I think my own tendency to stress-eat comes from a childhood where eating was my only reliable source of comfort.