Metabolic pathways in the body determine how we utilize the macronutrients (carbohydrates, proteins and fats) we eat, and ultimately what happens to the fuels that come from each macronutrient. It all depends on when the last meal was finished. If the body is in a "fasting or starvation" mode, energy pathways will behave differently than when food is available.
The macronutrients (carbohydrate, fats and protein) on your plate are broken down in separate metabolic pathways:
Carbohydrate, fats and protein are metabolized in separate processes into a common product called acetyl-CoA. Acetyl-CoA is a major metabolic pathways player, and is an important part of the process which creates the energy molecule called ATP (adenosine triphosphate) in the cell mitochondria.
The fasting state begins about 2-4 hours after a meal, when blood glucose drops toward it's normal baseline. This drop in blood sugar causes insulin levels to also decline. Another hormone, glucagon, is released and it triggers the release of glycogen and fatty acids to fuel the body until the next meal arrives.
After about 3 days of fasting, the stored glycogen in the liver and muscles is exhausted, insulin levels drop and the body ramps up its access to stored fat. As fatty acids flow into the blood stream, the liver takes the excess fats and creates more ketone bodies through ketosis.
The muscles continue to burn fatty acids, but decrease their use of ketones. The ketone bodies then build up in the blood stream to a level at which the brain begins to oxidize them for fuel. As the brain uses the ketones, it needs less glucose, so the liver decreases the rate of gluconeogenesis. This helps preserve muscle tissue as the body doesn't need to break down the amino acids to convert them to glucose.
Because of ketosis and the ketones, the human body can survive for long periods without eating.
During a ketogenic diet, the lack of carbohydrate (glucose) mimics the "starvation" metabolic pathway in the body, in that the liver creates more ketones since less glucose is available. And the best part is that there's no hunger, but you get the benefits of burning fat for fuel.
In addition, protein intakes stay within normal ranges and so muscle loss is minimal, and lean body mass stays within healthy ranges. You lose fat instead of valuable muscle mass.
Finally, the markers for heart disease improve because when you cut carbohydrates, the triglyceride levels in your blood will drop significantly. And as you eat more saturated fat, your HDL cholesterol levels will go up. That's a good thing because it improves the ratio of triglycerides to HDL, which is the most important marker for heart disease risk.
If you are interested in more details on this subject, the University of Nebraska at Lincoln offers a great resource.