From what I understand, shivering is the body's means of generating more heat. Elevated temperature kills germs in the body. The chill reaction signals the body to shiver and to begin generating more heat.
When you get sick your body will raise it temperature in order to kill the invading virus/germs. After a bit you will start to get chills as your body tries to cool itself back down.