When glucose production is low, the brain begins using ketoacids as energy... how does that work?
Human body is a glucose driven machine which intake carbohydrates and converts to glucose. Energy is yielded from the glucose and glucose is stored as glycogen. When the carbohydrate intake is somehow reduced then body will shift its mechanism and uses the fatty acids to produce energy. Liver synthesis ketones from fatty acids in our diet or from body fat. Ketones(acetoacetate and acetone) are released into the blood, which is absorbed by the brain and synthesis energy from it through their mitochondria.


  The brain gets a portion of its energy from ketone bodies when glucose
  is less available (e.g., during fasting, strenuous exercise, low
  carbohydrate, ketogenic diet and in neonates). In the event of low
  blood glucose, most other tissues have additional energy sources
  besides ketone bodies (such as fatty acids), but the brain has an
  obligatory requirement for some glucose. After the diet has been
  changed to lower blood glucose for 3 days, the brain gets 25% of its
  energy from ketone bodies.After about 4 days, this goes up to 70%
  (during the initial stages the brain does not burn ketones, since they
  are an important substrate for lipid synthesis in the brain).
  Furthermore, ketones produced from omega-3 fatty acids may reduce
  cognitive deterioration in old age.
  Reference


When the body starts using the fatty acids for energy production, one problem arises in the brain and that is the blood-brain barrier( barrier that separates the circulating blood from the brain extracellular fluid in the central nervous system )Brain cannot use long chain fatty acids because they cannot cross the blood-brain barrier due to their bondage with albumin. As ketones are medium chain fatty acids which can effectively cross the barrier. So brain uses the ketones for energy production by a process called as ketosis. The ketone bodies are then incorporated into acetyl-CoA and used in the citric acid cycle.


  The citric acid cycle – also known as the tricarboxylic acid (TCA)
  cycle or the Krebs cycle – is a series of chemical reactions used by
  all aerobic organisms to generate energy through the oxidation of
  acetate derived from carbohydrates, fats and proteins into carbon
  dioxide and chemical energy in the form of adenosine triphosphate
  (ATP).
  Reference


Metabolic pathways to produce energy