And finally to carbohydrates. This is a confusing one, and usually gets broken up into 2 to 3 groups---grains and legumes, vegetables, and fruits. Carbohydrates are basically sugars, but they're sugars our body needs to work right.
Grains and legumes (and potatoes) are the starchy ones. They supply calories and slower burning energy, and many of them supply at least some protein and fat, helping support those parts of your diet. That's one of the reasons that they're often treated separately from fruits and vegetables. They generally are not nearly as high in most vitamins as the fruits and vegetables, but you do get a lot of B vitamins and fiber from most of these.
Fruits supply a lot of energy in the form of simpler sugars, and tend to be very high in some vitamins, plus the fiber. The same for vegetables, though they're mostly high in a different group of vitamins and may or may not have much fiber. Eating these alone will tend to give you a lot of energy...briefly. Then you'll usually be ready for a nap.
No matter how badly you want to lose weight, don't eat just the fruits and vegetables. That's like piling up a handful of twigs, dousing them with kerosene, and wondering why they flare up and burn to ash in just a few minutes. Include some legumes and grains and at least a little fat---some avocado or a boiled egg or some low-fat milk or yogurt.