Thinking about carbs probably conjures up images of anything and everything you've been programmed to avoid: pasta, cookies, cake, bread. These foods get a bad rap, so it's no wonder that so many of us get the impression that carbs are bad for you. Nutritional advice in the past has trained us to almost fear them—and feel guilty for breaking down and indulging in their dense, bready goodness.

But complex carbohydrates, like those found in whole grain breads, grains like quinoa and farro, and yes, fruits, veggies, and dairy, are all part of a healthy diet. In fact, your body needs carbohydrates to complete its basic functions.

Here's what's really happening inside your body when you eat carbs, and why they're not the villains you've been taught to believe.

So, are carbs bad for you or good for you? Well, that's really not the question you should be asking. Because when you look closely, not all carbs are created equal.

Carbs get a bad rap because we all think of the less-healthy ones—simple carbs like white bread, donuts, bagels, sugary cereal—which aren't great for our health. But carbs come in two forms: simple and complex. "Simple carbohydrates are made up of short chains of carbon molecules that require little breakdown and go directly into the bloodstream [and cause a blood sugar spike]," Kim Larson, R.D., spokesperson for the Academy of Nutrition and Dietetics, tells SELF. Any simple carbohydrate, or just straight up sugar, really has no redeeming qualities, nutritionally speaking. Sugar is also associated with inflammation, which is connected to a slew of of problems, like heart disease and cancer. If you're interested in the science around sugar and our bodies, you might want to check out Sugar Science, a (self-described) "authoritative source for the scientific evidence about sugar and its impact on health," created by a team of health scientists from the University of California at San Francisco.

But about complex carbohydrates. These carbs have longer chains of carbon molecules, so it takes longer for your body to break them down. Which means the sugar isn't dumped into our bloodstream such as what happens with simple carbs. "We experience a more steady-state infusion of sugar into our bloodstream that supplies longer lasting energy," Larson says.

Whatever type of carbohydrates you eat, your body works to break them down to their simplest form: glucose.

"The breakdown of carbohydrates starts in our mouth with salivary enzymes, then goes to the mechanical churning of the stomach using digestive enzymes, along with B vitamins (the helpers), and the journey ends when they are in their simplest form, glucose, which is then absorbed in the small intestine," Larson explains. Glucose then travels to the liver to be distributed throughout the body. Your cells first use whatever glucose they need for energy, sending it to the muscles and tissues in your body. Some gets stored in the liver as a reserve tank, and any excess is stored as fat, both in the liver and in adipose tissue around your body. We know loading up on sugar is bad for our bodies, and can lead to chronic diseases like obesity and diabetes. Too much of any carbohydrate can do that, too, since it all ends up as glucose.

We need carbohydrates for our bodies to even function.

Carbohydrates are our bodies' main source of energy. "Glucose is the form of sugar that our brains use," explains Keri Glassman, R.D. We need a certain amount of it to fuel all of our metabolic processes "so we can have energy to do things like breathe, digest, run, work, think." Literally, everything. Fat and protein have their jobs, too, but when it comes to getting that basic energy, carbs are key.

So, what about the whole weight-gain thing? "Certainly eating too much of anything (including protein and fat) will cause weight gain," Larson explains. Just eating more calories than you burn in a day can lead to weight gain. The problem is that simple carbs and sugars won't keep you full, so they're really easy to overeat. If you eat healthy carbs, as part of a balanced diet that also includes protein and fat, your body will function the way it should.

Healthy, complex carbs are found in more foods than you think. And you should be eating them every day.

When someone says, “I’m cutting out carbs," they usually mean they're cutting out breads and pasta, Larson explains. Many of us forget that milk, whole grains, fruits, and vegetables are all carbohydrates, and also come with essential nutrients like fiber and protein. So when you're eating cauliflower, peas, bananas, apples, broccoli—the list goes on—you're indeed eating carbohydrates. And your body is happy about it.

Ditching all carbs isn't a good move. Instead, eat the good kinds in moderation. "Over half of our daily calories should come from quality carbohydrates, like whole grains, dairy, fruits, and vegetables," Larson notes. "We cannot support the brain if we are taking in less than 120 grams of carbohydrate per day, and a lack of glucose (like oxygen) to the brain can cause irreversible damage." So certainly cut out those bad carbs, but you can (and should) eat the healthy ones every single day. (Here are seven great ones that can actually help you lose weight.)