Stars such as Beyoncé and Hugh Jackman have spoken publicly about following intermittent-fasting plans to get in shape. So how does intermittent fasting work? We spoke with one of the leading neuroscientists in this field, Mark Mattson of the National Institute on Aging Intramural Research Program, to learn more.

Following is a transcript of the video.

How long has it been since you last ate? People who fast intermittently often eat within an eight-hour block, leaving 16 hours of fasting in between. During that 16-hour stretch, their bodies undergo an important change that sets them apart from nonfasters.

Here's how it works.

When you eat, you store some of that energy in the liver as glycogen. But after 10 to 12 hours of not eating, your glycogen reserves will be extremely low. As a result, you may feel more irritable than normal — or "hangry."

The upside is, with little glycogen left, fat cells in your body release fats into your bloodstream. The fat cells head straight to your liver, where they're converted to energy for your body and brain. So you are literally burning fat to survive.

Blood samples show that people who fasted for 12 to 24 hours experienced a 60% increase in energy from fat, with the biggest change occurring after 18 hours. This is the benefit to intermittent fasting because it puts you in a state called "ketosis." And it's why researchers think intermittent fasting could be the key to a longer, healthier life.

The process of burning fat releases chemicals called ketones. In the brain, ketones trigger the release of an important molecule called BDNF. BDNF helps build and strengthen neurons and neural connections in areas of the brain responsible for learning and memory. Which could explain why a boost in ketone production has been shown to improve memory in people with early signs of dementia in as soon as six weeks. Increasing ketones in the body is also a common treatment for patients with severe epilepsy.

You don't necessarily have to fast to boost your ketone levels. Introducing more fatty foods into your diet and cutting back on carbs can have a similar effect. A group of people who tried this method for three months not only lost weight and body fat but also saw a decrease in blood pressure and a hormone (IGF-1) related to aging and disease.

But scientists have discovered that fasting increases ketone levels more. Ketogenic diets can increase ketones fourfold whereas fasting has been shown to increase ketones by up to twentyfold. As a result, fasting, compared to a ketogenic diet, may have a stronger, more beneficial effect on overall health.

Yet many Americans who eat three meals a day with snacks in between never reach ketosis, and therefore aren't producing enough ketones to promote good health.

Fasting and ketosis have been keys to our survival from the beginning. They helped our ancient ancestors survive through bouts of starvation. And today they're becoming recognized as ways to help keep future generations mentally and physically disease-free.