ELI5 Body Temperature and illness

Im hungover. My body temperature skyrocketed about 15 minutes ago and I knew I was about to vomit. Always happens. Immediately afterwards, full body shivers and absolutely freezing. I also always experience a spike in temperature when I'm having diarrhea.

What's going on there? Why does illness affect body temperature so much?