Ketone bodies are produced by the liver and used peripherally as an energy source when glucose is not readily available.
They are produced from acetyl-CoA, mainly in the mitochondrial matrix of liver cells when carbohydrates are so scarce that energy must be obtained from breaking down of fatty acids.
Tissues that can use fatty acids can generally use ketone bodies in addition to other energy sources. The exceptions are the liver and the brain.