It's a very complex hormonal and biochemical interaction. Fatty acids are mobilized from adipose tissue and ketogenic pathways are activated in the liver. The hormone glucagon stimulates this ketogenesis process. The fatty acids are converted into ketones by your mitochondria and liver and used as energy. The byproduct is exhaled out through your breath as the ketone body acetone and carbon dioxide. Additionally, some of the byproducts of fat metabolism leave your body via urinary ketone body excretion as the ketones β-hydroxybutyrate and acetoacetate. For a more detailed answer I recommend: Fatty Acid Oxidation