The process by which cells produce energy is called oxidative phosphorylation. I'm going to try not to make this super spergy, but the topic is complex. First, you need to know that a series of interconnected chemical reactions are constantly occurring within every cell in your body. At this very moment, all of your cells are doing loads of work to keep you reading the Farms like a bigot autist. It's amazing. Next time you feel like you aren't accomplishing anything, remember that. These chemical reactions are grouped into "pathways", which just means they happen in sequence and the products of one reaction are used by the next. Each of these reactions is "powered" (catalyzed) by a group of highly specialized proteins called enzymes, each of which react with a specific molecule, referred to as a substrate. Here's a great diagram I found on Wikipedia, of all places, which shows the major metabolic pathways and their connections to one another.
The two pathways we care about for the purposes of this post are called the citric acid cycle (or Krebs cycle) and oxidative phosphorylation. The citric acid cycle uses a molecule called acetyl coenzyme A (acetyl CoA), produced in other reactions by the breakdown (catabolism) of carbohydrates, fats, and proteins, and creates various amino acid precursors to be used in other pathways. Most importantly for this discussion, the citric acid cycle turns a molecule called NAD+ into another called NADH, in a process called reduction. NADH is called an electron donor, which means it gives up an electron to another molecule, releasing energy. In oxidative phosphorylation, NADH (and another electron donor called FADH) and oxygen are used to make adenosine triphosphate (ATP), which is vitally important because it's the main energy unit of all cells. Every process in the body requires ATP. Without sufficient ATP, cells cannot perform their normal biochemical functions, their structural integrity is compromised, and waste products which would normally be transported through the cell membrane build up, altering the pH inside the cell. This damages the structures (organelles) within the cell, including the lysosomes and the peroxisomes. The lysosome is important because it is like the stomach of the cell: it contains enzymes which are necessary for breaking down other molecules. Normally, the lysosomal membrane keeps these enzymes from being released and destroying the cell, while still allowing molecules from the outside to enter. Peroxisomes are structures containing enzymes which metabolize lipids by a process called beta oxygenation, which produces acetyl CoA, the molecule which is required for the citric acid cycle. When the lysosome or peroxisome is damaged, it releases all of these enzymes which start breaking down the cell itself.