Carbohydrates are one of the three macronutrient molecules; the other two are proteins and fats. Macronutrients are compounds you need in large quantities each day to help fill energy needs. It wouldn't be accurate to say there are only three important functions of carbohydrates in the body, but there are certainly three major ones.
Carbohydrates are compounds of carbon, oxygen and hydrogen that have twice as many atoms of hydrogen as of oxygen. The nutritional carbohydrates include sugars, starch and fiber; all consist of one or more smaller units called monosaccharides, or single-sugar units. Sugars have only one or two monosaccharides, while starch and fiber are long chains of monosaccharides.
Perhaps the most familiar function of carbohydrates in the body is that they provide for your cells' immediate energy needs. When you consume sugars or starch, they are broken down into their constituent monosaccharide units and absorbed into the bloodstream. Your cells take them up from there and can then burn them chemically by combining them with oxygen to produce ATP, or adenosine triphosphate, which is a cellular energy "currency."
Another important function of carbohydrates is that they provide for energy needs during periods of fasting, in two ways. First, cells can take the monosaccharides you've absorbed from your food and make glycogen out of them; glycogen is a carbohydrate made by and stored in the liver and muscles that becomes a source of carbohydrate if your blood sugar drops. Alternatively, the body can convert monosaccharides into fat, which can be used later for energy.
One very important role of carbohydrate in the body has nothing to do with energy. Even though you don't digest or absorb fiber, it's still critical to proper digestive tract function. Fiber helps keep your gut moving food along at a regular rate, which prevents constipation and optimizes absorption and subsequent elimination. Fiber also binds to toxins and cholesterol, helping to ensure you don't absorb dangerous compounds from your food.