There are so many factors in balancing your foods, it can be done by calories, by grams, by types of fat, by nutrient content or food category and many more other considerations. It would be hard and time consuming to learn them all at once so start by keeping it simple, calorie balance, fat content and nutritional variety.
Here is a diagram that displays the proportion of different foods that should be in the diet.

This diagram is not easily simplified into fat, protein and carbohydrate! Generally vegetables, fruit and wholegrain and cereal can be thought of as mostly carbohydrate. sugars are carbohydrate too. Dairy is largely protein but can contain a lot of fat and carbohydrates so learn to read the food labels or ask your online PT. Meats, beans and pulses are protein.