Your calorie targets are initially calculated based on your input data, such as weight, body fat percentage, and activity levels.
Then, based on your current body fat percentage and fitness goals & level of training experience, you will be recommended to lose a certain percentage of your body weight per week (for fat loss) or gain a certain amount of weight per month (for muscle building). You have the option to manually select the target weight change as well.
Based on the amount that you want to gain or lose, this will then correspond to your calorie deficit (fat loss) or surplus (muscle gain). The calorie target you then receive will be the number of calories you need to eat to achieve your goal.
For protein, the recommendations are set in a range targeting a daily protein intake of 1.65-2.8 g/kg of fat free mass. To find your fat free mass, you multiply your body weight (in kilograms) by your estimated body fat percentage and then subtract that from your total body weight.