If you work out with weights, you may not lose body weight. You’ll be more likely to gain weight. Muscle is heavier than fat by volume. As you build muscle, you might lose inches, but not weight, because the volume of muscle is heavier than fat.
Strength-training exercise (lifting weights) is not designed to help people lose weight. That isn’t the purpose of the training. The idea is to make muscles bigger and stronger, and you’ll often gain weight in the process.
Cardio exercises like aerobic exercises, running, walking, and riding a bike are the exercises needed by those who wish to LOSE weight. These are exercises that expend a lot of energy (burn a lot of calories) in a short period of time. Cardio or aerobic exercises are designed to build endurance rather than strength. Aerobic exercise will give you the endurance to run uphill for a long time. Weight training will give you the strength to lift the hill, so to speak.
Building muscle mass means forcing the body to increase the size and strength of the muscles. The body doesn’t just build muscles because it doesn’t have anything better to do. You can’t eat the “right” foods or take the “right” supplements and make your body build muscle. Those things can give your body the tools it needs to build muscle, but it won’t make the body use them. The ONLY way to make muscles get bigger is to damage the muscle by lifting weights and letting the body repair the damage by building more muscle tissue.
The way to inflict damage upon the muscle is by lifting weights repeatedly to the point where the muscle fails. When the muscle fails, that means that enough damage has been inflicted. The next step is to rest while the body repairs the damage (builds muscle tissue). Then you again inflict damage by lifting heavier weights and doing more reps to start the process all over again.