The calories you consume vs the calories you burn will determine the results you are looking for.
Calorie - Form of energy
BMR - Basal Metabolic Rate (The amount of energy the body uses when at rest)
3500 Calories = 1 pound of body fat
Example
Determine your BMR using a BMR calculator (http://www.bmi-calculator.net/bmr-calculator/#result)
Lets round this to 2000 calories
Now this is the energy you will burn if you did nothing all day, just layed in bed, essentially, this is what you need to maintain your current weight.
Now if you want to gain or lose weight, you simply add 500 or subtract 500 calories to your current BMR
Calories per day you need to consume in order to gain/lose 1 pound of fat every 7 days.
2000 - 500 = 1500 Calories per day x 7 days = 10500 Calories per week = 1 pound of fat lost
2000 + 500 = 2500 Calories per day x 7 days = 17500 Calories per week = 1 pound of fat gained
1 pound x 4 weeks = 4 pounds of body fat lost or gained per month
4 pounds x 12 months = 48lbs of body fat lost or gained per year
Essentially what this is telling you, eat what ever you want, as long as you hit your daily caloric goal. Although this is strictly for weight loss/gain of body fat if you do NOT exercise.
If you are working out it's very similar but you must incorporate some important fundamentals.
Macro Nutrients (Carbohydrate, Protein, Fat)
Micro Nutrients (Vitamins, Minerals)
Carbohydrate provides 4 calories per gram.
Protein provides 4 calories per gram.
Fat provides 9 calories per gram.
Take your daily caloric goal for what ever you are trying to do and plug it into this calculator and it will give you the macros you need to consume each day to hit your caloric goal. It also will show you grams per meal. (http://macronutrientcalculator.com/)
If you are strict enough to hit that caloric goal each day, you will see the results you want.