shivering is your body trying to make extra heat- your muscles work even though you are not moving to burn more food and make more heat energy to keep you warm
When you are cold, your body’s 1st thing is to protect and maintain the heat around your vital organs (you don’t want them to get damaged), and so your body gets the muscles around these organs to expand/contract really quickly (so lots of little movements) in an effort to generate warmth. This tiny but rapid movement results in you shivering.
Comments