Cellular swelling primarily results from energy failure, often due to hypoxia or exposure to toxic agents. When the energy production in the form of adenosine triphosphate (ATP) is compromised, the sodium-potassium pumps in the cell membrane become dysfunctional. This leads to the accumulation of sodium ions inside the cell, attracting water and causing the cell to swell.