system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does eating spoiled food actually make you sick?
gpt
Most food gets spoiled because of microbes growing in it.  These microbes are competing with animals like you for dead animal and plant material...if you eat the food they are growing on, they lose their food source and might die.  So some kinds of microbes make chemical compounds that taste bad or are straight up toxic to keep animals from coming along and eating their meal.   A lot of food poisoning happens when you consume these toxins and they make you sick in various ways.  Sometimes you also get infected by a pathogen, but it's definitely not the main way to get sick from spoiled food.  

This is why cooking spoiled food doesn't necessarily make it safe.  If you kill all the microbes, you may still leave behind the toxins.