Why do You Shiver When You are Cold?

People shiver when they are cold to try to keep their body temperature from dropping. Muscles contract to generate heat, which gives you the shiver feeling. Personally, I would rather shiver than sweat when I was cold, wouldnt want the sweat to freeze and become a popsicle.