Carbohydrates is a macronutrient and can be broken down into 3 categories: Sugars, Starches & Fiber.
The main purpose of carbs in the diet is to provide energy. Most carbs get broken down or transformed into glucose, which can be used as energy. Carbs can also be turned into fat (stored energy) for later use.
Fiber is an exception, as it cannot be digested. It does not provide energy directly, but it does feed the friendly bacteria in the digestive system. These bacteria can use the fiber to produce fatty acids that some of our cells can use as energy.