The usual approach is to reduce calories consumed (“diet”) and/or increase calories burned (“exercise”) often summarized as, “Eat less, move more.”
While there are many ways to approach the calorie reduction part (like tracking "points," using prepackaged meals, replacing meals with smoothies or shakes, drastically reducing carbs, etc.), one of the most common is counting calories. This has been made much easier with apps (like those from myfitnesspal, sparkpeople, or fatsecret) that let you quickly enter foods while it tallies up calorie counts against a target total.
These apps also let you enter calories from exercise, using those calories to increase the target calorie goal for the day. MyFitnessPal calls them "earned" calories.
However, people who are trying to lose weight almost invariably exercise to burn calories (which is not a great reason, but that's another story). So does it make sense to enter calories burned by exercise? Here are some considerations:
Is your calorie target taking exercise into account? Most tools use some variation of the Harris-Benedict calculation to estimate your Basal Metabolic Rate (BMR). These are the calories you burn just to stay alive. The calculation considers your height, weight, age, and gender. Usually, your activity level (sedentary, very active, etc.) is then used to estimate actual calories burned during the day. This is just an estimate (and can be off by a few hundred calories) but if you're considering the exercise you normally do in your selection of activity level, those calories are already "baked in" your target. Don't double-count them.
How intense is your exercise? If it's low-intensity aerobic work, those calories aren't worth counting since they're unlikely to play much of a role in your metabolism. That is, the exercise doesn't encourage you to eat more. High-intensity workouts, on the other hand, can leave you feeling hungry. If you haven't accounted for this in your calorie target, it can be helpful to include these calories in your logging. Just be sure not to overestimate your workout!
Are you trying to build muscle? If increasing muscle size (hypertrophy) or even just strength is your main goal for the workout, you need to be sure you get enough for your body to repair and rebuild. Again, this is only if you haven't included this in your activity estimate for your target caloric intake. And, again, don't overestimate your workout.
24 hours is not always a day. If you do strength training late in the day, you'll want to be sure your body has enough energy available during recovery which can last well over 24 hours. So, for example, if you lift before dinner, you could add 1/3 of the "earned" calories that evening and the other 2/3 through lunch the next day. If you're trying to drop fat (like most people), 24 hours is long enough to boost calories.
Don't just "eat less, move more." This popular strategy can work in the short-term (as in a week or less) but in the long term it will excess fatigue and/or cravings as your body fights to maintain its hard-won reserves (even if they really weren't hard to pack on at all). As an alternative to "eat less, move more" consider "eat less, exercise less" (ELML) or "eat more, exercise more" (EMEM). These terms appear to have originated with Dr. Jade Teta at Metabolic Effect and emphasize the difficulty in bucking your current metabolism. Remember the goal (for fat loss) is a caloric deficit. You can get this with well-designed ELML or EMEM without the metabolic stress of eating less and exercising more (ELEM).
Ultimately you need a strategy you can live with for a long time. "Diet" has been twisted into a four-letter word despised by most because it implies suffering. The word (as a noun) actually means the food that you eat habitually. We all have a diet but we're not all on a diet (or dieting). The same applies to exercise. Keep it in mind if you're counting calories.
Be seeing you.