When the temperature rises, the bacteria form spores that can survive harsh conditions, and then when it's cooler it starts growing again. The toxin that this produces can survive reheating. It's more commonly found on rice, but it can also be found on pasta.