To lose one pound in a week you need to create a caloric deficit of 3500 calories in that week. Given how many calories your body burns, if you eat 250 carlories less each day and burn 250 calories more each day exercising, then you will lose one pound in a week. (3500/7=500=250+250.)
What if you are trying to gain weight? If you are trying to gain muscle, then eat about 100 calories more than your body burns in a day. You can gain up to 0.5 pounds of muscle in a week. If you gain more than that, it probably isn't all muscle.
What about only dieting? What about only exercising? Again, to lose one pound in a week you need to create a caloric deficit of 3500 calories. Neither of these are practical strategies by themselves. It is simply not practical for most people to eat 500 calories less each day. That is like missing a meal and you will be too hungry. It is also not practical for most people to burn 500 calories a day--that's about 2 hours of walking on the treadmill, which most busy people do not have time to do. You really need to do both diet and exercise. It's the easiest way.
Do the math. 3500/7=500=250+250