Here are some ideas I would like to offer. A lot depends on your current weight, your will power and your physiological health. If you already have diabetes/high cholesterol etc, you need to consult a doctor for recommendations about safe foods.
1. WALK. WALK. WALK. Humans have evolved over thousands of years basically walking. Technology has fucked us today. Fuck technology. WALK.
2. DRINK WATER. LOTS OF WATER.
3. EAT FOODS THAT YOU COOK YOURSELF FROM RAW INGREDIENTS. This is a big point. You don't need to go on any fad diet. Just make sure you eat food that you cook from natural raw ingredients.
This means lots of vegetables, some meat, some eggs, some fish, rice, nuts, fruits. Avoid stuff like bread, cakes, cookies. This is not something you can make from raw ingredients yourself. So fuck'em.
4. Depending on your age, you may want to take up some weight training. If you decide to go with weight training, avoid fancy dumbbell exercises. Stick to compound movements with a barbell like squats, deadlifts, overhead press, bench press etc. If you are absolutely out of shape, you may need to wait a bit before you start with this.
5. The key to losing fat with exercise is to do exercises that burn calories even after working out. This means intense anabolic cardio or intense weight lifting. Low intensity ellipticals can help tone your body if you are already in a decent shape. They won't help you lose 40 pounds. Again, depending on your current fitness level, some of the following could be useful:
Indoor rowing, sprinting, High intensity interval training with bodyweight - stuff like push ups, burpees, mountain climbers etc.
6. LOTS of GOOD SLEEP.
7. SUPREME WILL POWER.
GOOD LUCK.