The easiest way I found to lose weight was Cyclical Ketogenic Diet.
At the end of the day, it's calories in, and calories out. Simple biology. But if you want to maintain lean muscle and lose fat, then as baseline6 says, it's all about the diet.
CKD diet is what I did, and it worked brilliantly. But it's tough as shit the first few weeks. Basically it's a modified low carb diet where you eat absolutely no carbs M-F. Then you load up on carbs Friday night, saturday and part of Sunday. It's more complicated than that, but that's the gist.
What this does is, you slip into ketosis during the week, where your body burns fat as energy instead of sugar. However, if you do this for a few weeks you will get fatigued because you have to pound the weights (that's how you keep the lean muscle) and feed them protein.
You carb up over the weekend to provide a little relief and also to help you start the week with more energy.
You lose 1-2 lbs of fat each week and hopefully minimal muscle loss. An easy way to keep an eye on your muscle loss is how much weight you can push. If you notice a precipitous drop, you're losing lean muscle and need to adjust.
You won't bulk, and you won't get much stronger on this diet. It is purely to lose fat. And once you've attained the level you like, you obviously have to maintain a good diet after like all diets.
Many ways to skin a cat, this is one of them.