One reason for (black coffee) and aerobic exercise is to raise the heart rate. Improve metabolism.
Functions vary from person to person. But the most direct factor to lose weight is your energy balance. If you consume too much energy, any form of weight loss is meaningless. For example, if you run for 2 hours a day, even if you can run away the extra energy, your body will store water, so you won't look thin and gain weight.