They are called macronutrients (as opposed to vitamins and minerals which are micronutrients).
Fat contains 8 calories per gram, protein and carbohydrates contain four, alcohol contains about 7 calories per gram.
Fat and carbohydrates are energy substrates, protein is used for reparation (although it can be turned into fat and either be stored as fat or converted to ketones and used as energy)
Of the three macro nutrients, two are essential (meaning you have to consume them in order to stay alive) those two are fat and protein, there are two essential fatty acids and 8 essential amino acids (protein, there are also a couple of "conditionally" essential amino acids that are essential in certain cases like disease)