First getting to grips with ketones:
you guys all know that glucose is a substrate generally used by your cells for generating energy (glycolysis and oxidative phosphorylation etc...). Say someone is starving. They generally don't have glucose and stores of glycogen to last them beyond say 12-24 hours. After that you need to use other substrates. Fats & amino acids are both options. So someone that is starving starts to switch to these. The details do not matter. Part of the aim is to use amino acids from your muscle to produce glucose (and you liver does this quite well). And the reason glucose is important is because your brain and red blood cells can NOT use much else. For example your red blood cells have no mitochondria and so need that glucose to keep them going.
But imagine you are starving for 7 days - your muscle protein can only last for so long, so your body needs to find another way to supply the brain and RBCs. And this is where ketones come in. Happy to answer more questions on this but essentially what happens is your body breaks down your fats into bodies called ketones (which are actually a ketone with a carboxylic acid, although acetone is one ketone body and is the one which makes these patients breath slightly fruity).
And the reason it produces ketones is because ketones are effectively a fast food energy supply - it gives the brain and RBCs a ready access to something it can use for ATP.
Again I can explain this in more depth and more detail with sources, but I am just typing up a rough overview of the basics to give you some context.