Often pneumonia starts as a simple cold which goes down onto the chest. There, the virus causes inflammation of the lung tissue, and this allows any bacteria that are there to get past the local immune defences and set up a secondary infection.
This is especially likely to happen if the child is already weakened from malnutrition. This bacterial infection then spreads quickly through the child's lungs.
The air sacks of the lungs fill with fluid, which may thicken into phlegm. This prevents air exchange between the lung and the blood. The child is thus starved for oxygen, and struggles to breathe. The disease progresses quickly, and often a child who had a mild cough in the morning will be gravely ill by the night. Without treatment the end is inevitable. Death occurs because of asphyxiation.